You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2009/06/29 19:59:00 UTC

svn commit: r789399 - /camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java

Author: janstey
Date: Mon Jun 29 17:59:00 2009
New Revision: 789399

URL: http://svn.apache.org/viewvc?rev=789399&view=rev
Log:
Use direct endpoints to avoid a race condition that fails these tests sometimes

Modified:
    camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java?rev=789399&r1=789398&r2=789399&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/processor/enricher/PollEnricherTest.java Mon Jun 29 17:59:00 2009
@@ -45,7 +45,7 @@
     // -------------------------------------------------------------
 
     public void testPollEnrichInOnly() throws InterruptedException {
-        template.sendBody("seda:foo1", "blah");
+        template.sendBody("direct:foo1", "blah");
 
         mock.expectedBodiesReceived("test:blah");
         template.sendBody("direct:enricher-test-1", "test");
@@ -61,7 +61,7 @@
 
         // now send it and try again
         mock.reset();
-        template.sendBody("seda:foo2", "blah");
+        template.sendBody("direct:foo2", "blah");
         template.sendBody("direct:enricher-test-2", "test");
         mock.assertIsSatisfied();
     }
@@ -75,7 +75,7 @@
                 } catch (InterruptedException e) {
                     // ignore
                 }
-                template.sendBody("seda:foo3", "blah");
+                template.sendBody("direct:foo3", "blah");
             }
         });
 
@@ -94,14 +94,14 @@
     // -------------------------------------------------------------
 
     public void testPollEnrichInOut() throws InterruptedException {
-        template.sendBody("seda:foo4", "blah");
+        template.sendBody("direct:foo4", "blah");
 
         String result = (String) template.sendBody("direct:enricher-test-4", ExchangePattern.InOut, "test");
         assertEquals("test:blah", result);
     }
 
     public void testPollEnrichInOutPlusHeader() throws InterruptedException {
-        template.sendBody("seda:foo4", "blah");
+        template.sendBody("direct:foo4", "blah");
 
         Exchange exchange = template.request("direct:enricher-test-4", new Processor() {
             public void process(Exchange exchange) {
@@ -123,15 +123,15 @@
                 // -------------------------------------------------------------
 
                 from("direct:enricher-test-1")
-                    .pollEnrich("seda:foo1", aggregationStrategy)
+                    .pollEnrich("direct:foo1", aggregationStrategy)
                     .to("mock:mock");
 
                 from("direct:enricher-test-2")
-                    .pollEnrich("seda:foo2", 1000, aggregationStrategy)
+                    .pollEnrich("direct:foo2", 1000, aggregationStrategy)
                     .to("mock:mock");
 
                 from("direct:enricher-test-3")
-                    .pollEnrich("seda:foo3", -1, aggregationStrategy)
+                    .pollEnrich("direct:foo3", -1, aggregationStrategy)
                     .to("mock:mock");
 
                 // -------------------------------------------------------------
@@ -139,7 +139,7 @@
                 // -------------------------------------------------------------
 
                 from("direct:enricher-test-4")
-                    .pollEnrich("seda:foo4", aggregationStrategy);
+                    .pollEnrich("direct:foo4", aggregationStrategy);
             }
         };
     }