diff --git a/org.springframework.integration/src/test/java/org/springframework/integration/executor/ErrorHandlingExecutorBeanPostProcessorTests.java b/org.springframework.integration/src/test/java/org/springframework/integration/executor/ErrorHandlingExecutorBeanPostProcessorTests.java index 462cf48966..1bd4690682 100644 --- a/org.springframework.integration/src/test/java/org/springframework/integration/executor/ErrorHandlingExecutorBeanPostProcessorTests.java +++ b/org.springframework.integration/src/test/java/org/springframework/integration/executor/ErrorHandlingExecutorBeanPostProcessorTests.java @@ -49,6 +49,7 @@ public class ErrorHandlingExecutorBeanPostProcessorTests { ErrorThrowingRunnable runnable = new ErrorThrowingRunnable(); taskExecutor.execute(runnable); assertTrue("Runnable faield to run",runnable.latch.await(5, TimeUnit.SECONDS)); + Thread.sleep(100); assertEquals("Incorrect count of exceptions", 1, errorHandler.throwables.size()); } @@ -58,6 +59,7 @@ public class ErrorHandlingExecutorBeanPostProcessorTests { ErrorThrowingRunnable runnable = new ErrorThrowingRunnable(); taskExecutor.execute(runnable); assertTrue("Runnable faield to run",runnable.latch.await(5, TimeUnit.SECONDS)); + Thread.sleep(100); assertEquals("Incorrect count of exceptions", 0, errorHandler.throwables.size()); } @@ -68,7 +70,6 @@ public class ErrorHandlingExecutorBeanPostProcessorTests { public void run() { latch.countDown(); throw new RuntimeException(); - } }