RFR: 8309890: TestStringDeduplicationInterned.java waits for the wrong condition [v2]
Stefan Karlsson
stefank at openjdk.org
Tue Jun 13 09:16:55 UTC 2023
On Tue, 13 Jun 2023 07:20:09 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
>> Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Review kbarrett
>
> test/hotspot/jtreg/gc/stringdedup/TestStringDeduplicationTools.java line 396:
>
>> 394:
>> 395: if (!waitForDeduplication(dupString3, internedString)) {
>> 396: if (getValue(dupString3) != getValue(internedString)) {
>
> This line is no longer needed. waitForDeduplication returns false if the two strings underlying char arrays
> (returned by getValue) don't become equal during the waiting period. So unless it just happened that they
> became equal after waitForDeduplication gave up but before this check, this check will fail.
I've updated the test.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14437#discussion_r1227799296
More information about the hotspot-gc-dev
mailing list