camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r956045 - in /camel/trunk/camel-core/src: main/java/org/apache/camel/processor/validation/ test/java/org/apache/camel/component/seda/ test/java/org/apache/camel/component/vm/ test/java/org/apache/camel/impl/
Date Fri, 18 Jun 2010 16:45:28 GMT
Author: davsclaus
Date: Fri Jun 18 16:45:27 2010
New Revision: 956045

URL: http://svn.apache.org/viewvc?rev=956045&view=rev
Log:
Polished and fixed spelling.

Modified:
    camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatorErrorHandler.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaShouldNotUseSameThreadTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmShouldNotUseSameThreadTest.java
    camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java

Modified: camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatorErrorHandler.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatorErrorHandler.java?rev=956045&r1=956044&r2=956045&view=diff
==============================================================================
--- camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatorErrorHandler.java
(original)
+++ camel/trunk/camel-core/src/main/java/org/apache/camel/processor/validation/ValidatorErrorHandler.java
Fri Jun 18 16:45:27 2010
@@ -42,7 +42,7 @@ public interface ValidatorErrorHandler e
      * @param exchange the exchange
      * @param schema   the schema
      * @param result   the result
-     * @throws ValidationException is thrown in case of validatation errors
+     * @throws ValidationException is thrown in case of validation errors
      */
     void handleErrors(Exchange exchange, Schema schema, Result result) throws ValidationException;
 }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaShouldNotUseSameThreadTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaShouldNotUseSameThreadTest.java?rev=956045&r1=956044&r2=956045&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaShouldNotUseSameThreadTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/seda/SedaShouldNotUseSameThreadTest.java
Fri Jun 18 16:45:27 2010
@@ -53,7 +53,7 @@ public class SedaShouldNotUseSameThreadT
                 from("seda:foo").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
                         assertEquals(null, local.get());
-                        assertNotSame("Thead is should not be same", id, Thread.currentThread().getId());
+                        assertNotSame("Thread is should not be same", id, Thread.currentThread().getId());
                     }
                 }).to("mock:result");
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmShouldNotUseSameThreadTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmShouldNotUseSameThreadTest.java?rev=956045&r1=956044&r2=956045&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmShouldNotUseSameThreadTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/component/vm/VmShouldNotUseSameThreadTest.java
Fri Jun 18 16:45:27 2010
@@ -53,7 +53,7 @@ public class VmShouldNotUseSameThreadTes
                 from("vm:foo").process(new Processor() {
                     public void process(Exchange exchange) throws Exception {
                         assertEquals(null, local.get());
-                        assertNotSame("Thead is should not be same", id, Thread.currentThread().getId());
+                        assertNotSame("Thread is should not be same", id, Thread.currentThread().getId());
                     }
                 }).to("mock:result");
             }

Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java?rev=956045&r1=956044&r2=956045&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
(original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultProducerTemplateAsyncTest.java
Fri Jun 18 16:45:27 2010
@@ -548,6 +548,32 @@ public class DefaultProducerTemplateAsyn
         assertEquals(7, ORDER.get());
     }
 
+    public void testAsyncCallbackThreadsInOutProcessor() throws Exception {
+        ORDER.set(0);
+
+        final CountDownLatch latch = new CountDownLatch(1);
+
+        template.asyncCallback("direct:threads", new Processor() {
+            public void process(Exchange exchange) throws Exception {
+                exchange.getIn().setBody("Bye");
+                exchange.setPattern(ExchangePattern.InOut);
+            }
+        }, new SynchronizationAdapter() {
+            @Override
+            public void onDone(Exchange exchange) {
+                ORDER.addAndGet(2);
+                assertEquals("ByeBye", exchange.getOut().getBody());
+                latch.countDown();
+            }
+        });
+
+        ORDER.addAndGet(1);
+        latch.await(10, TimeUnit.SECONDS);
+        ORDER.addAndGet(4);
+
+        assertEquals(7, ORDER.get());
+    }
+
     @Override
     protected RouteBuilder createRouteBuilder() throws Exception {
         return new RouteBuilder() {
@@ -566,6 +592,8 @@ public class DefaultProducerTemplateAsyn
                     });
 
                 from("direct:echo").transform(body().append(body()));
+
+                from("direct:threads").threads(5).transform(body().append(body()));
             }
         };
     }



Mime
View raw message