8179314: CountedCompleterTest.testForkHelpQuiesce fails with expected:<21> but was:<13>
authordl
Thu, 09 Nov 2017 16:07:21 -0800
changeset 47728 0a65c8231efa
parent 47727 53020d8cdf5b
child 47729 1563167c9520
8179314: CountedCompleterTest.testForkHelpQuiesce fails with expected:<21> but was:<13> Reviewed-by: martin, psandoz, dholmes
test/jdk/java/util/concurrent/tck/CountedCompleterTest.java
--- a/test/jdk/java/util/concurrent/tck/CountedCompleterTest.java	Thu Nov 09 16:03:37 2017 -0800
+++ b/test/jdk/java/util/concurrent/tck/CountedCompleterTest.java	Thu Nov 09 16:07:21 2017 -0800
@@ -758,6 +758,8 @@
                 CCF f = new LCCF(8);
                 assertSame(f, f.fork());
                 helpQuiesce();
+                while (!f.isDone()) // wait out race
+                    ;
                 assertEquals(21, f.number);
                 assertEquals(0, getQueuedTaskCount());
                 checkCompletedNormally(f);