RFR: 7901757: Race in counting total number of failures from TestNG [v2]
Jaikiran Pai
jpai at openjdk.org
Fri Jul 26 10:36:12 UTC 2024
> Can I please get a review of this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/CODETOOLS-7901757?
>
> As noted there, the current implementation in jtreg's testng test listener doesn't take into account that the callback methods on that listener instance can be invoked concurrently for different threads. As a result, the count tracking logic in the listener ends up in a race condition which results in reporting incorrect numbers.
>
> The commit in this PR fixes that issue and introduces a self test which reproduces the race issue and verifies the fix. The new test and existing tests continue to pass with this change.
Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
Update src/share/classes/com/sun/javatest/regtest/agent/TestNGRunner.java
Co-authored-by: Pavel Rappo <32523691+pavelrappo at users.noreply.github.com>
-------------
Changes:
- all: https://git.openjdk.org/jtreg/pull/216/files
- new: https://git.openjdk.org/jtreg/pull/216/files/4b3f3f87..13dbf5ea
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jtreg&pr=216&range=01
- incr: https://webrevs.openjdk.org/?repo=jtreg&pr=216&range=00-01
Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
Patch: https://git.openjdk.org/jtreg/pull/216.diff
Fetch: git fetch https://git.openjdk.org/jtreg.git pull/216/head:pull/216
PR: https://git.openjdk.org/jtreg/pull/216
More information about the jtreg-dev
mailing list