Skip to content

Commit b2e326d

Browse files
Copilotjaydeluca
andcommitted
Address PR feedback: update test commands, remove unnecessary config, emphasize testing framework
Co-authored-by: jaydeluca <[email protected]>
1 parent 7667390 commit b2e326d

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

.github/agents.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,15 @@ Always reference these instructions first and fallback to search or bash command
1111
- `./gradlew assemble` -- builds the complete Java agent. NEVER CANCEL. Build takes 20-45 minutes. Set timeout to 60+ minutes.
1212
- `./gradlew check javadoc sourcesJar -x spotlessCheck -PskipTests=true` -- builds with checks but skips tests for faster iteration
1313
- The Java agent artifact will be at: `javaagent/build/libs/opentelemetry-javaagent-<version>.jar`
14-
- For faster local development, add `removeJarVersionNumbers=true` to `~/.gradle/gradle.properties` to keep consistent jar names
14+
1515
- Run tests:
16-
- `./gradlew test` -- runs all tests. NEVER CANCEL. Takes 60-120 minutes across multiple Java versions. Set timeout to 180+ minutes.
16+
- `./gradlew test` -- runs tests. NEVER CANCEL. Takes 60-120 minutes across multiple Java versions. Set timeout to 180+ minutes.
17+
- `./gradlew check` -- runs all tests and checks. NEVER CANCEL. Takes 60-120 minutes across multiple Java versions. Set timeout to 180+ minutes.
1718
- `./gradlew :instrumentation:test` -- runs instrumentation tests only
1819
- `./gradlew :smoke-tests:test` -- runs smoke tests (separate from main test suite)
1920
- `./gradlew test -PtestJavaVersion=<version>` -- test on specific Java version (8, 11, 17, 21, 23, 24, 25-ea)
2021
- `./gradlew test -PtestLatestDeps=true` -- test against latest dependency versions
21-
- `./gradlew test -Ddev=true -x spotlessCheck -x checkstyleMain` -- ignore warnings during development
22+
2223
- Code quality:
2324
- `./gradlew spotlessCheck` -- NEVER CANCEL. Takes 10-20 minutes with ~500 modules. Set timeout to 30+ minutes.
2425
- `./gradlew spotlessApply` -- auto-fix formatting issues
@@ -29,7 +30,7 @@ Always reference these instructions first and fallback to search or bash command
2930
- Build validation scenario: After successful build, verify the Java agent jar exists at `javaagent/build/libs/opentelemetry-javaagent-*.jar`
3031
- Test validation scenarios:
3132
- Run specific instrumentation tests: `./gradlew :instrumentation:<INSTRUMENTATION_NAME>:test --tests <TEST_CLASS>`
32-
- Always test with `./gradlew test -Ddev=true -x spotlessCheck -x checkstyleMain` to ignore warnings during development
33+
- Always test with `./gradlew test -x spotlessCheck -x checkstyleMain`
3334
- Use build scans for debugging failures - check `build-scan.txt` after failed builds
3435
- ALWAYS manually test instrumentation changes by running the affected instrumentation's test suite
3536

@@ -70,6 +71,7 @@ Key directories:
7071
- IntelliJ users: Use module unloading to reduce resource consumption with 500+ modules
7172

7273
### Testing Patterns
74+
- Tests use AssertJ for assertions and JUnit 5 as the testing framework
7375
- Tests use multiple JVM versions: 8, 11, 17, 21, 23, 24, 25-ea
7476
- Tests run on both HotSpot and OpenJ9 VMs
7577
- Matrix testing: 4 test partitions × multiple Java versions × 2 VMs
@@ -125,4 +127,4 @@ Key directories:
125127
- `TESTCONTAINERS_DOCKER_SOCKET_OVERRIDE` - Docker socket location
126128
- `TESTCONTAINERS_HOST_OVERRIDE` - Container-to-container communication host
127129
- `USE_LINUX_CONTAINERS=1` - Force Linux containers on Windows
128-
- Set `-Ddev=true` for development to ignore warnings in tests
130+
- Set `-Ddev=true` for development to ignore warnings in tests - only when necessary

0 commit comments

Comments
 (0)