Skip to content

Commit

Permalink
Fix a flaky test caused by race condition
Browse files Browse the repository at this point in the history
  • Loading branch information
shunping committed Feb 9, 2024
1 parent ff272db commit 06490ef
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,7 @@ public void testCloseVisibleToAwaitCompletionCallerAndProducer() throws Exceptio
Future<?> future2 =
executor.submit(
() -> {
Thread.sleep(500); // give the previous future some time to reach the inf while loop
observer.close();
return null;
});
Expand Down

0 comments on commit 06490ef

Please sign in to comment.