From 81629363a9121c0b178a6ed96367ffdf4ff589eb Mon Sep 17 00:00:00 2001 From: Jonas Partner Date: Thu, 30 Oct 2008 14:38:32 +0000 Subject: [PATCH] sleep after the latch to make sure the exception is there --- .../executor/ErrorHandlingExecutorBeanPostProcessorTests.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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(); - } }