-
Notifications
You must be signed in to change notification settings - Fork 324
Update tests to run with JUnit 5 #9445
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
nikita-tkachenko-datadog
merged 68 commits into
master
from
nikita-tkachenko/junit5-testing
Sep 9, 2025
Merged
Changes from 53 commits
Commits
Show all changes
68 commits
Select commit
Hold shift + click to select a range
b51891f
Update AgentTestRunner to use JUnit5
nikita-tkachenko-datadog fb23244
Fix iast and appsec test fixtures classpath
nikita-tkachenko-datadog 6195dc7
Fix agent-testing tests
nikita-tkachenko-datadog dadece6
Fix IAST tests
nikita-tkachenko-datadog 6bd53b0
Fix Jetty tests
nikita-tkachenko-datadog ee37411
Fix IAST tests
nikita-tkachenko-datadog cc364ab
Fix servlet tests
nikita-tkachenko-datadog 952eb06
Fix log4j2 tests
nikita-tkachenko-datadog 6a5561f
Fix Jetty tests
nikita-tkachenko-datadog 8e7b825
Fix log4j2 tests
nikita-tkachenko-datadog 96285e4
Removed a file committed accidentally
nikita-tkachenko-datadog b37d536
Minor cleanups
nikita-tkachenko-datadog b3600f1
Split CI Visibility test fixtures into a separate project
nikita-tkachenko-datadog 1285825
Fix Appsec tests
nikita-tkachenko-datadog 90ff66f
Fix tests after rebase conflicts
nikita-tkachenko-datadog 092091e
Fix tests after rebase
nikita-tkachenko-datadog 6f45038
Fix a SpotBugs warning
nikita-tkachenko-datadog 3df713f
Remove instrumentation-testing dependency from Gradle and Maven smoke…
nikita-tkachenko-datadog e09ea5c
Fix compilation error
nikita-tkachenko-datadog cc30b04
Fix Iast tests
sarahchen6 d0e2740
Fix servlet/request-2 test
sarahchen6 7c2ec00
Fix instrumentation test
sarahchen6 f582dc8
Fix jetty test
sarahchen6 f4c259a
Give more time for aws sqs, kafka, and vertx tests
sarahchen6 17f661b
Run latestDepJava11Test on Java 11 only
sarahchen6 2b923ec
Fix vertx-web tests
sarahchen6 f8e440a
Fix play-ws tests
sarahchen6 4cf11b4
Address codenarc issue
sarahchen6 70ff95a
Loosen exception expectations for PlayWS only
sarahchen6 bea85ff
Do not run Karate test samples: they're only needed as inputs for ins…
nikita-tkachenko-datadog e602a2d
Restore super. method calls erroneously replaced with Object. during …
nikita-tkachenko-datadog 2a5479b
Restore formatting
nikita-tkachenko-datadog b5f73cf
Suppress CIVis warning
sarahchen6 ef9f98d
Reset classloader matcher's cached state before each instrumentation …
nikita-tkachenko-datadog 6fb4423
Do not load test classes with bootstrap classloader (fixes ExceptionH…
nikita-tkachenko-datadog 4459ff3
Fix bootstrap class check to correctly handle classes whose names end…
nikita-tkachenko-datadog 0ee9943
Evaluate isTest check lazily to avoid overhead
nikita-tkachenko-datadog dacb913
Extract common code in a utility method
nikita-tkachenko-datadog 73f4895
Add comments for extra test time
sarahchen6 57315bd
Test jdbc latestdepjava11 on java 11+
sarahchen6 7ff7d47
Extract common code in a utility method
nikita-tkachenko-datadog 0681bb5
Fix IAST tests
nikita-tkachenko-datadog 11cb5b2
Import AgentTracer instead of FQN
nikita-tkachenko-datadog 7836c1e
Rename AgentTestRunner and other instrumentation-testing classes + up…
nikita-tkachenko-datadog ef488c9
Merge branch 'master' into nikita-tkachenko/junit5-testing
nikita-tkachenko-datadog b281647
Rename now-redundant explicit JUnit 5 declaration for forkedTest tasks
nikita-tkachenko-datadog 240ba4d
Rename instrumentation fixtures projects and add readme files
nikita-tkachenko-datadog f75a988
Restore original timeout for aws-java-sqs-1.0 forked tests
nikita-tkachenko-datadog 95abf16
Restore original timeout for remaining tests
sarahchen6 94a3be7
Fix MakeTaintableInstrumentation instrumentation in pekko IAST tests
nikita-tkachenko-datadog 679fa0c
Revert "Restore original timeout for remaining tests"
nikita-tkachenko-datadog c803820
Revert "Restore original timeout for aws-java-sqs-1.0 forked tests"
nikita-tkachenko-datadog 70348ec
Propagate pekko IAST fix to latestDep tests as well
sarahchen6 450d944
Fix typo in readme
nikita-tkachenko-datadog 65b8e63
Merge branch 'master' into nikita-tkachenko/junit5-testing
nikita-tkachenko-datadog 42ed209
Cleanup gradle dependencies
nikita-tkachenko-datadog 78ae232
Replace hamcrest matchers FQN with short name
nikita-tkachenko-datadog d9ddbc4
Remove redundant bootstrap prefixes copy
nikita-tkachenko-datadog 525333c
Simplify isBootstrapClass method
nikita-tkachenko-datadog 46cd888
Fix LLMOBS module dependencies
nikita-tkachenko-datadog ff52d3b
Merge branch 'master' into nikita-tkachenko/junit5-testing
nikita-tkachenko-datadog f88ddf8
Address review comments
nikita-tkachenko-datadog c50b95f
Remove redundant commit
nikita-tkachenko-datadog fd7a0d5
Use utility method instead of repeated code blocks
nikita-tkachenko-datadog 42599ea
Fix compilation error after moving the files around
nikita-tkachenko-datadog c427898
Housekeeping: codeowners and coverage exclusions
nikita-tkachenko-datadog 6b1df6f
Fix HTTPClientTest post refactoring
nikita-tkachenko-datadog 36f5715
Clean up helper methods
sarahchen6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
...-agent/agent-ci-visibility/civisibility-instrumentation-test-fixtures/README.MD
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # civisibility-instrumentation-test-fixtures | ||
|
|
||
| This project contains common logic used in CI Visibility instrumentation tests. | ||
|
|
||
| The reason it is defined as a separate project rather than using testFixtures plugin in the parent module is because it | ||
| transitively pulls-in :dd-java-agent:instrumentation-testing. | ||
| The latter contains datadog.trace.agent.test.BootstrapClasspathSetupListener that, when present on the classpath, | ||
| patches bootstrap CL adding some tracer classes to it. | ||
| This is needed for the instrumentation tests, but may break regular unit tests. | ||
| If this project used testFixtures, the listener would end up on the classpath of the parent project's unit tests, breaking them. |
8 changes: 8 additions & 0 deletions
8
dd-java-agent/agent-ci-visibility/civisibility-instrumentation-test-fixtures/build.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| apply from: "$rootDir/gradle/java.gradle" | ||
| apply from: "$rootDir/gradle/version.gradle" | ||
|
|
||
| dependencies { | ||
| api project(':dd-java-agent:instrumentation-testing') | ||
| api project(':dd-java-agent:agent-ci-visibility:civisibility-test-fixtures') | ||
| } | ||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
dd-java-agent/agent-ci-visibility/civisibility-test-fixtures/build.gradle
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| apply from: "$rootDir/gradle/java.gradle" | ||
| apply from: "$rootDir/gradle/version.gradle" | ||
|
|
||
| dependencies { | ||
| api project(':dd-java-agent:agent-ci-visibility') | ||
| api project(':dd-java-agent:testing') | ||
| api project(':utils:test-utils') | ||
bric3 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| api group: 'org.skyscreamer', name: 'jsonassert', version: '1.5.1' | ||
| api group: 'org.freemarker', name: 'freemarker', version: '2.3.31' | ||
| api group: 'com.jayway.jsonpath', name: 'json-path', version: '2.8.0' | ||
| api group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: '2.16.0' | ||
| api group: 'org.msgpack', name: 'jackson-dataformat-msgpack', version: '0.9.6' | ||
| api group: 'org.xmlunit', name: 'xmlunit-core', version: '2.10.3' | ||
| } | ||
|
|
||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # iast-test-fixtures | ||
|
|
||
| This project contains common logic used in IAST instrumentation tests. | ||
|
|
||
| The reason it is defined as a separate project rather than using testFixtures plugin in the parent module is because it | ||
| transitively pulls-in :dd-java-agent:instrumentation-testing. | ||
| The latter contains datadog.trace.agent.test.BootstrapClasspathSetupListener that, when present on the classpath, | ||
| patches bootstrap CL adding some tracer classes to it. | ||
| This is needed for the instrumentation tests, but may break regular unit tests. | ||
| If this project used testFixtures, the listener would end up on the classpath of the parent project's unit tests, breaking them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| apply from: "$rootDir/gradle/java.gradle" | ||
| apply from: "$rootDir/gradle/version.gradle" | ||
|
|
||
| dependencies { | ||
| api project(':dd-java-agent:agent-iast') | ||
| api project(':dd-java-agent:instrumentation-testing') | ||
| api project(':utils:test-utils') | ||
bric3 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
.../datadog/iast/test/IastSourcesTest.groovy → .../datadog/iast/test/IastSourcesTest.groovy
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| # appsec-fixtures | ||
|
|
||
| This project contains common logic used in Appsec instrumentation tests. | ||
|
|
||
| The reason it is defined as a separate project rather than using testFixtures plugin in the parent module is because it | ||
| transitively pulls-in :dd-java-agent:instrumentation-testing. | ||
| The latter contains datadog.trace.agent.test.BootstrapClasspathSetupListener that, when present on the classpath, | ||
| patches bootstrap CL adding some tracer classes to it. | ||
| This is needed for the instrumentation tests, but may break regular unit tests. | ||
| If this project used testFixtures, the listener would end up on the classpath of the parent project's unit tests, breaking them. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| apply from: "$rootDir/gradle/java.gradle" | ||
| apply from: "$rootDir/gradle/version.gradle" | ||
|
|
||
| dependencies { | ||
| api project(':dd-java-agent:appsec') | ||
| api project(':dd-java-agent:instrumentation-testing') | ||
| api project(':utils:test-utils') | ||
bric3 marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| } | ||
|
|
||
| configurations.api { | ||
| exclude group: 'org.eclipse.jetty', module: 'jetty-server' | ||
| } | ||
File renamed without changes.
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.