Skip to content

Commit 1ce5d90

Browse files
Update TestNG6 DTD resolution during tests (#11206)
# What Does This Do - In TestNG instrumentation tests related to XML-defined test suites, switches the DTD URL in `<!DOCTYPE suite SYSTEM …>` from `https://testng.org/testng-1.0.dtd` to `http://testng.org/testng-1.0.dtd` so the XML parser relies on the classpath-bundled DTD. # Motivation TestNG's XML parsers will try to resolve and validate the DTD definition when running the test suites. This is a source of flakiness for the instrumentation tests as the resolution depends on network calls. # Additional Notes test-environment-trigger: skip # Contributor Checklist - Format the title according to [the contribution guidelines](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#title-format) - Assign the `type:` and (`comp:` or `inst:`) labels in addition to [any other useful labels](https://github.com/DataDog/dd-trace-java/blob/master/CONTRIBUTING.md#labels) - Avoid using `close`, `fix`, or [any linking keywords](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) when referencing an issue Use `solves` instead, and assign the PR [milestone](https://github.com/DataDog/dd-trace-java/milestones) to the issue - Update the [CODEOWNERS](https://github.com/DataDog/dd-trace-java/blob/master/.github/CODEOWNERS) file on source file addition, migration, or deletion - Update [public documentation](https://docs.datadoghq.com/tracing/trace_collection/library_config/java/) with any new configuration flags or behaviors Jira ticket: [PROJ-IDENT] ***Note:*** **Once your PR is ready to merge, add it to the merge queue by commenting `/merge`.** `/merge -c` cancels the queue request. `/merge -f --reason "reason"` skips all merge queue checks; please use this judiciously, as some checks do not run at the PR-level. For more information, see [this doc](https://datadoghq.atlassian.net/wiki/spaces/DEVX/pages/3121612126/MergeQueue). <!-- # Opening vs Drafting a PR: When opening a pull request, please open it as a draft to not auto assign reviewers before you feel the pull request is in a reviewable state. # Linking a JIRA ticket: Please link your JIRA ticket by adding its identifier between brackets (ex [PROJ-IDENT]) in the PR description, not the title. This requirement only applies to Datadog employees. --> Co-authored-by: daniel.mohedano <daniel.mohedano@datadoghq.com>
1 parent 3ba8d13 commit 1ce5d90

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

  • dd-java-agent/instrumentation/testng/testng-6.4/src/test/resources
    • test-successful-test-cases-in-TESTS-parallel-mode-not-all-test-methods-included
    • test-successful-test-cases-in-TESTS-parallel-mode-same-test-case
    • test-successful-test-cases-in-TESTS-parallel-mode

dd-java-agent/instrumentation/testng/testng-6.4/src/test/resources/test-successful-test-cases-in-TESTS-parallel-mode-not-all-test-methods-included/suite.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
1+
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
22
<suite name="API Test Suite" parallel="tests" configfailurepolicy="continue">
33
<test name="Test A">
44
<classes>

dd-java-agent/instrumentation/testng/testng-6.4/src/test/resources/test-successful-test-cases-in-TESTS-parallel-mode-same-test-case/suite.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
1+
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
22
<suite name="API Test Suite" parallel="tests" configfailurepolicy="continue">
33
<test name="Test A">
44
<classes>

dd-java-agent/instrumentation/testng/testng-6.4/src/test/resources/test-successful-test-cases-in-TESTS-parallel-mode/suite.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<!DOCTYPE suite SYSTEM "https://testng.org/testng-1.0.dtd" >
1+
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
22
<suite name="API Test Suite" parallel="tests" configfailurepolicy="continue">
33
<test name="Test A">
44
<classes>

0 commit comments

Comments
 (0)