Skip to content

Commit

Permalink
[FLINK-23045][tests] Harden RunnablesTest by not relying on timeout
Browse files Browse the repository at this point in the history
This closes apache#16261.
This commit hardens the RunnablesTest.testExecutorService_uncaughtExceptionHandler to not rely
on timeouts to check whether the uncaught exception handler was called.
  • Loading branch information
tillrohrmann committed Jun 25, 2021
1 parent 24d3f1a commit 4d5f4df
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,9 @@ public void testExecutorService_uncaughtExceptionHandler() throws InterruptedExc
() -> {
throw new RuntimeException("foo");
});
Assert.assertTrue(
"Expected handler to be called.",
handlerCalled.await(TIMEOUT_MS, TimeUnit.MILLISECONDS));

// expect handler to be called
handlerCalled.await();
}

@Test
Expand Down

0 comments on commit 4d5f4df

Please sign in to comment.