8227235: rare failures in testForkHelpQuiesce tck tests
Reviewed-by: martin, alanb
--- a/test/jdk/java/util/concurrent/tck/ForkJoinTask8Test.java Sat Sep 14 11:16:40 2019 -0700
+++ b/test/jdk/java/util/concurrent/tck/ForkJoinTask8Test.java Sat Sep 14 11:20:57 2019 -0700
@@ -559,6 +559,8 @@
AsyncFib f = new AsyncFib(8);
assertSame(f, f.fork());
helpQuiesce();
+ while (!f.isDone()) // wait out race
+ ;
assertEquals(0, getQueuedTaskCount());
f.checkCompletedNormally();
}};
--- a/test/jdk/java/util/concurrent/tck/ForkJoinTaskTest.java Sat Sep 14 11:16:40 2019 -0700
+++ b/test/jdk/java/util/concurrent/tck/ForkJoinTaskTest.java Sat Sep 14 11:20:57 2019 -0700
@@ -526,6 +526,8 @@
AsyncFib f = new AsyncFib(8);
assertSame(f, f.fork());
helpQuiesce();
+ while (!f.isDone()) // wait out race
+ ;
assertEquals(21, f.number);
assertEquals(0, getQueuedTaskCount());
checkCompletedNormally(f);