RFR: 8364927: Add @requires annotation to TestReclaimStringsLeaksMemory.java [v2]
jonghoonpark
duke at openjdk.org
Wed Sep 3 13:24:43 UTC 2025
On Wed, 3 Sep 2025 11:48:46 GMT, Stefan Karlsson <stefank at openjdk.org> wrote:
>> I included that part because it was already present in the original code.
>> I thought it was there to test the case where a GC other than SerialGC, ParallelGC, or G1GC might be used as the default.
>>
>> However, after reviewing your feedback, I realized that the other tests clearly focus only on the specific GCs that are actually required.
>>
>> Then, would it be better to remove the first test and add tests for other GCs later only if they turn out to be necessary?
>
>>I thought it was there to test the case where a GC other than SerialGC, ParallelGC, or G1GC might be used as the default.
>
> That could be the case. However, I think that most of our tests don't care about that and instead follow the pattern in TestSystemGC.java
>
>> Then, would it be better to remove the first test and add tests for other GCs later only if they turn out to be necessary?
>
> I think so.
>
> Do you know if ZGC and Shenandoah works with this test? If they do you could also consider adding them. Though that requires you to verify that they actually do pass the test.
I have confirmed that both ZGC and Shenandoah GC pass the test.
Then I’ll update the PR by removing the first test item and including them.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26766#discussion_r2318961928
More information about the hotspot-gc-dev
mailing list