Skip to content

Commit

Permalink
8227235: rare failures in testForkHelpQuiesce tck tests
Browse files Browse the repository at this point in the history
Reviewed-by: martin, alanb
  • Loading branch information
Doug Lea committed Sep 14, 2019
1 parent 80fe274 commit f634f77
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions test/jdk/java/util/concurrent/tck/ForkJoinTask8Test.java
Original file line number Diff line number Diff line change
Expand Up @@ -559,6 +559,8 @@ protected void realCompute() {
AsyncFib f = new AsyncFib(8);
assertSame(f, f.fork());
helpQuiesce();
while (!f.isDone()) // wait out race
;
assertEquals(0, getQueuedTaskCount());
f.checkCompletedNormally();
}};
Expand Down
2 changes: 2 additions & 0 deletions test/jdk/java/util/concurrent/tck/ForkJoinTaskTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -526,6 +526,8 @@ protected void realCompute() {
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);
Expand Down

0 comments on commit f634f77

Please sign in to comment.