On Thu, 7 Dec 2023 05:18:26 GMT, Jaikiran Pai <j...@openjdk.org> wrote:
>> This slightly increases the wait for reference processing to complete to >> accommodate long Xcomp compile times. Testing is underway. > > test/jdk/java/lang/Object/FinalizationOption.java line 89: > >> 87: static boolean checkFinalizerCalled(boolean expected) { >> 88: create(); >> 89: for (int i = 0; i < 100; i++) { > > Hello Tom, I think this entire loop can be replaced by using the > `jdk.test.lib.util.ForceGC` utility class available in the tests. That class > has the necessary knowledge of using the jtreg timeout factor. I think you > could replace this loop with something like (I haven't tried it): > > > ForceGC.wait(() -> finalizerWasCalled); Thanks for the tip. I'll take a look at. Even if there isn't something that's exactly right I think having a general waitForReferenceProcessing helper would be a good idea for any tests which do this. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/16956#discussion_r1419305640