RFR: 8320198: some reference processing tests don't wait long enough for reference processing to complete
Jaikiran Pai
jpai at openjdk.org
Thu Dec 7 05:21:33 UTC 2023
On Mon, 4 Dec 2023 17:46:18 GMT, Tom Rodriguez <never at 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);
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16956#discussion_r1418373430
More information about the core-libs-dev
mailing list