Skip to content

[improve][test] Upgrade TestNG to 7.12.0 - #25666

Merged
lhotari merged 2 commits into
apache:masterfrom
lhotari:lh-testng-7.12.0
May 5, 2026
Merged

lhotari merged 2 commits into
apache:masterfrom
lhotari:lh-testng-7.12.0

Conversation

@lhotari

@lhotari lhotari commented May 4, 2026

Copy link
Copy Markdown
Member

Motivation

This PR upgrades the TestNG dependency from 7.7.1 to 7.12.0.

7.7.1 was released in December 2022, so the project has been three years behind the latest TestNG. Pulsar continues to rely on TestNG for the entire test suite, so the testing framework should be kept reasonably up-to-date in order to pick up bug fixes, stability improvements (notably around parallel data providers / shared thread pools, retry handling, and listener invocation ordering), and to stay compatible with newer JDKs and tooling.

Notable highlights from the releases between 7.7.1 and 7.12.0 (release notes on https://github.com/testng-team/testng/releases):

  • 7.8.0 (2023-05): correct test status when ITestResult.status is set to FAILURE; per-class configfailurepolicy; multiple data-provider/retry fixes; SnakeYAML upgraded to 2.0.
  • 7.9.0 (2023-12): data-race fixes; thread-safety for attribute access; suite-level data-provider thread pools; CompletableFuture-based concurrency; @Inherited on @Listeners.
  • 7.10.0 (2024-04): listener ordering; runtime listener disabling; non-cacheable data providers; unique IDs for test class instances; build modernization (Gradle 8.6, Java 11 target).
  • 7.10.1 / 7.10.2 (2024-04): bug fixes around listener comparator and Issue #3059: Behavior of redelivery and ackTimeout in Java client errorΒ #3110.
  • 7.11.0 (2025-02): deadlock reporting in shared thread pool; JCommander 1.83; SLF4J 2.0.16; assertEqualsDeep(Set, Set, ...) correctness fix; ignored-test-count fix; CLI option to exclude tests.
  • 7.12.0 (2026-01): timeout stack-trace propagation (#2765); shared thread pool fixes; refresh DataProvider parameters on retry when cacheDataForTestRetries=false; retry-infinite-loop fix (#3231); JDK 25 workflow.

Modifications

  • Bump testng in gradle/libs.versions.toml from 7.7.1 to 7.12.0.

Verifying this change

  • Make sure that the change passes the CI checks.

This change is a trivial dependency upgrade. Verified locally with:

  • ./gradlew assemble β€” BUILD SUCCESSFUL
  • ./gradlew testClasses (compile tests across all modules) β€” BUILD SUCCESSFUL
  • ./gradlew spotlessCheck checkstyleMain checkstyleTest β€” BUILD SUCCESSFUL

Existing tests cover usage of TestNG; no production code changes are introduced.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency) β€” TestNG (test scope only)

@lhotari lhotari added this to the 5.0.0-M1 milestone May 4, 2026
@lhotari
lhotari merged commit d52f2c3 into apache:master May 5, 2026
78 of 81 checks passed
poorbarcode pushed a commit to poorbarcode/pulsar that referenced this pull request May 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants