File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,33 @@ This repository provides observability instrumentation for Java applications.
2929- Resource cleanup and lifecycle management
3030- Comprehensive unit tests for new functionality
3131
32+ ### Test suites
33+
34+ This project uses gradle 9 which requires specifying test classes and paths explicitly.
35+
36+ For example, this will NOT work because it registers a ` Test ` without specifying the test classes or paths:
37+
38+ ``` kotlin
39+ tasks.register<Test >(" IntegrationTestUserCreds" ) {
40+ dependsOn(tasks.shadowJar)
41+ dependsOn(tasks.named(" copyAgent" ))
42+ .. .
43+ }
44+ ```
45+
46+ This is fixed by specifying the test classes and classpath explicitly:
47+
48+ ``` kotlin
49+ tasks.register<Test >(" IntegrationTestUserCreds" ) {
50+ testClassesDirs = sourceSets.test.get().output.classesDirs
51+ classpath = sourceSets.test.get().runtimeClasspath
52+
53+ dependsOn(tasks.shadowJar)
54+ dependsOn(tasks.named(" copyAgent" ))
55+ .. .
56+ }
57+ ```
58+
3259## Coding Agent Instructions
3360
3461When implementing changes or new features:
You can’t perform that action at this time.
0 commit comments