8227235: rare failures in testForkHelpQuiesce tck tests

Reviewed-by: martin, alanb
This commit is contained in:
Doug Lea 2019-09-14 11:20:57 -07:00
parent 80fe274875
commit f634f777f6
2 changed files with 4 additions and 0 deletions

View File

@ -559,6 +559,8 @@ public class ForkJoinTask8Test extends JSR166TestCase {
AsyncFib f = new AsyncFib(8);
assertSame(f, f.fork());
helpQuiesce();
while (!f.isDone()) // wait out race
;
assertEquals(0, getQueuedTaskCount());
f.checkCompletedNormally();
}};

View File

@ -526,6 +526,8 @@ public class ForkJoinTaskTest extends JSR166TestCase {
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);