camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cmuel...@apache.org
Subject svn commit: r1300359 - in /camel/trunk/components/camel-mybatis/src: main/java/org/apache/camel/component/mybatis/ test/java/org/apache/camel/component/mybatis/ test/resources/
Date Tue, 13 Mar 2012 21:27:42 GMT
Author: cmueller
Date: Tue Mar 13 21:27:41 2012
New Revision: 1300359

URL: http://svn.apache.org/viewvc?rev=1300359&view=rev
Log:
CAMEL-5081: org.apache.camel.component.mybatis.MyBatisBatchConsumerTest.testBatchConsumer()
fails unpredictable

Modified:
    camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisBatchConsumerTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisDeleteTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisPollingDelayRouteTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisQueueTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisRouteEmptyResultSetTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListWithSplitTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectOneTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownAllTasksTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownCurrentTaskOnlyTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisTestSupport.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUnknownStatementTypeTest.java
    camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUpdateTest.java
    camel/trunk/components/camel-mybatis/src/test/resources/SqlMapConfig.xml

Modified: camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java
(original)
+++ camel/trunk/components/camel-mybatis/src/main/java/org/apache/camel/component/mybatis/MyBatisConsumer.java
Tue Mar 13 21:27:41 2012
@@ -140,7 +140,7 @@ public class MyBatisConsumer extends Sch
             pendingExchanges = total - index - 1;
 
             // process the current exchange
-            LOG.debug("Processing exchange: {}", exchange);
+            LOG.debug("Processing exchange: {} with properties: {}", exchange, exchange.getProperties());
             getProcessor().process(exchange);
 
             try {

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisBatchConsumerTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisBatchConsumerTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisBatchConsumerTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisBatchConsumerTest.java
Tue Mar 13 21:27:41 2012
@@ -21,9 +21,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisBatchConsumerTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisDeleteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisDeleteTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisDeleteTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisDeleteTest.java
Tue Mar 13 21:27:41 2012
@@ -20,9 +20,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisDeleteTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisInsertTest.java
Tue Mar 13 21:27:41 2012
@@ -20,9 +20,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisInsertTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisPollingDelayRouteTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisPollingDelayRouteTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisPollingDelayRouteTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisPollingDelayRouteTest.java
Tue Mar 13 21:27:41 2012
@@ -20,9 +20,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisPollingDelayRouteTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisQueueTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisQueueTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisQueueTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisQueueTest.java
Tue Mar 13 21:27:41 2012
@@ -22,9 +22,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisQueueTest extends MyBatisTestSupport {
     
     protected boolean createTestData() {
@@ -37,25 +34,22 @@ public class MyBatisQueueTest extends My
 
     @Test
     public void testConsume() throws Exception {
-
         MockEndpoint endpoint = getMockEndpoint("mock:results");
         endpoint.expectedMinimumMessageCount(2);
 
-        Account account = new Account();
-        account.setId(1);
-        account.setFirstName("Bob");
-        account.setLastName("Denver");
-        account.setEmailAddress("TryGuessingGilligan@gmail.com");
-
-        template.sendBody("direct:start", account);
-
-        account = new Account();
-        account.setId(2);
-        account.setFirstName("Alan");
-        account.setLastName("Hale");
-        account.setEmailAddress("TryGuessingSkipper@gmail.com");
+        Account account1 = new Account();
+        account1.setId(1);
+        account1.setFirstName("Bob");
+        account1.setLastName("Denver");
+        account1.setEmailAddress("TryGuessingGilligan@gmail.com");
+
+        Account account2 = new Account();
+        account2.setId(2);
+        account2.setFirstName("Alan");
+        account2.setLastName("Hale");
+        account2.setEmailAddress("TryGuessingSkipper@gmail.com");
 
-        template.sendBody("direct:start", account);
+        template.sendBody("direct:start", new Account[]{account1, account2});
 
         assertMockEndpointsSatisfied();
 

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisRouteEmptyResultSetTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisRouteEmptyResultSetTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisRouteEmptyResultSetTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisRouteEmptyResultSetTest.java
Tue Mar 13 21:27:41 2012
@@ -22,9 +22,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisRouteEmptyResultSetTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListTest.java
Tue Mar 13 21:27:41 2012
@@ -22,9 +22,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisSelectListTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListWithSplitTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListWithSplitTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListWithSplitTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectListWithSplitTest.java
Tue Mar 13 21:27:41 2012
@@ -20,9 +20,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisSelectListWithSplitTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectOneTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectOneTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectOneTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisSelectOneTest.java
Tue Mar 13 21:27:41 2012
@@ -20,9 +20,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisSelectOneTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownAllTasksTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownAllTasksTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownAllTasksTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownAllTasksTest.java
Tue Mar 13 21:27:41 2012
@@ -22,9 +22,6 @@ import org.apache.camel.component.mock.M
 import org.junit.Before;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisShutdownAllTasksTest extends MyBatisTestSupport {
 
     @Override

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownCurrentTaskOnlyTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownCurrentTaskOnlyTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownCurrentTaskOnlyTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisShutdownCurrentTaskOnlyTest.java
Tue Mar 13 21:27:41 2012
@@ -22,9 +22,6 @@ import org.apache.camel.component.mock.M
 import org.junit.Before;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisShutdownCurrentTaskOnlyTest extends MyBatisTestSupport {
 
     @Override

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisTestSupport.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisTestSupport.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisTestSupport.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisTestSupport.java
Tue Mar 13 21:27:41 2012
@@ -24,9 +24,6 @@ import org.apache.camel.test.junit4.Came
 import org.junit.After;
 import org.junit.Before;
 
-/**
- * @version 
- */
 public abstract class MyBatisTestSupport extends CamelTestSupport {
 
     protected boolean createTestData() {
@@ -51,19 +48,19 @@ public abstract class MyBatisTestSupport
         connection.close();
 
         if (createTestData()) {
-            Account account = new Account();
-            account.setId(123);
-            account.setFirstName("James");
-            account.setLastName("Strachan");
-            account.setEmailAddress("TryGuessing@gmail.com");
-            template.sendBody("mybatis:insertAccount?statementType=Insert", account);
-
-            account = new Account();
-            account.setId(456);
-            account.setFirstName("Claus");
-            account.setLastName("Ibsen");
-            account.setEmailAddress("Noname@gmail.com");
-            template.sendBody("mybatis:insertAccount?statementType=Insert", account);
+            Account account1 = new Account();
+            account1.setId(123);
+            account1.setFirstName("James");
+            account1.setLastName("Strachan");
+            account1.setEmailAddress("TryGuessing@gmail.com");
+
+            Account account2 = new Account();
+            account2.setId(456);
+            account2.setFirstName("Claus");
+            account2.setLastName("Ibsen");
+            account2.setEmailAddress("Noname@gmail.com");
+            
+            template.sendBody("mybatis:insertAccount?statementType=Insert", new Account[]{account1,
account2});
         }
     }
 

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUnknownStatementTypeTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUnknownStatementTypeTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUnknownStatementTypeTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUnknownStatementTypeTest.java
Tue Mar 13 21:27:41 2012
@@ -21,9 +21,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.test.junit4.CamelTestSupport;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisUnknownStatementTypeTest extends CamelTestSupport {
 
     @Override

Modified: camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUpdateTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUpdateTest.java?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUpdateTest.java
(original)
+++ camel/trunk/components/camel-mybatis/src/test/java/org/apache/camel/component/mybatis/MyBatisUpdateTest.java
Tue Mar 13 21:27:41 2012
@@ -20,9 +20,6 @@ import org.apache.camel.builder.RouteBui
 import org.apache.camel.component.mock.MockEndpoint;
 import org.junit.Test;
 
-/**
- * @version 
- */
 public class MyBatisUpdateTest extends MyBatisTestSupport {
 
     @Test

Modified: camel/trunk/components/camel-mybatis/src/test/resources/SqlMapConfig.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-mybatis/src/test/resources/SqlMapConfig.xml?rev=1300359&r1=1300358&r2=1300359&view=diff
==============================================================================
--- camel/trunk/components/camel-mybatis/src/test/resources/SqlMapConfig.xml (original)
+++ camel/trunk/components/camel-mybatis/src/test/resources/SqlMapConfig.xml Tue Mar 13 21:27:41
2012
@@ -38,8 +38,6 @@
             <dataSource type="POOLED">
                 <property name="driver" value="org.apache.derby.jdbc.EmbeddedDriver"/>
                 <property name="url" value="jdbc:derby:memory:mybatis;create=true"/>
-                <property name="username" value="sa"/>
-                <property name="password" value=""/>
             </dataSource>
         </environment>
     </environments>



Mime
View raw message