camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r949129 - /camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
Date Fri, 28 May 2010 08:13:44 GMT
Author: davsclaus
Date: Fri May 28 08:13:43 2010
New Revision: 949129

URL: http://svn.apache.org/viewvc?rev=949129&view=rev
Log:
Fixed test

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java?rev=949129&r1=949128&r2=949129&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/CamelPostProcessorHelperTest.java
Fri May 28 08:13:43 2010
@@ -35,7 +35,7 @@ import org.apache.camel.util.ObjectHelpe
  */
 public class CamelPostProcessorHelperTest extends ContextTestSupport {
 
-    private MySynchronization mySynchronization;
+    private MySynchronization mySynchronization = new MySynchronization();
 
     public void testConstructor() {
         CamelPostProcessorHelper helper = new CamelPostProcessorHelper();
@@ -72,7 +72,6 @@ public class CamelPostProcessorHelperTes
     }
 
     public void testConsumeSynchronization() throws Exception {
-        mySynchronization = new MySynchronization();
         CamelPostProcessorHelper helper = new CamelPostProcessorHelper(context);
 
         MyConsumeAndSynchronizationBean my = new MyConsumeAndSynchronizationBean();
@@ -86,7 +85,10 @@ public class CamelPostProcessorHelperTes
 
         assertMockEndpointsSatisfied();
 
-        assertEquals("Should have invoked onDone", true, mySynchronization.isOnDone());
+        // give UoW a bit of time
+        Thread.sleep(500);
+
+        assertTrue("Should have invoked onDone", mySynchronization.isOnDone());
     }
 
     public void testEndpointInjectProducerTemplate() throws Exception {



Mime
View raw message