camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r790554 - in /camel/trunk: camel-core/src/test/java/org/apache/camel/component/file/ components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/ components/camel-spring/src/test/java/org/apache/camel/component/test/ compone...
Date Thu, 02 Jul 2009 11:43:27 GMT
Author: davsclaus
Date: Thu Jul  2 11:43:27 2009
New Revision: 790554

URL: http://svn.apache.org/viewvc?rev=790554&view=rev
Log:
Fixed some unit test reported by TC.

Removed:
    camel/trunk/camel-core/src/test/java/org/apache/camel/component/file/FileExclusiveReadRenameStrategyTest.java
    camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesSpringTest.java
Modified:
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
    camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/test/TestEndpointTest.java
    camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/test/TestEndpointTest-context.xml
    camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java?rev=790554&r1=790553&r2=790554&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/discovery/JmsDiscoveryTest.java
Thu Jul  2 11:43:27 2009
@@ -38,7 +38,7 @@
     @Test
     public void testDiscovery() throws Exception {
         MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMinimumMessageCount(3);
+        mock.expectedMessageCount(3);
 
         assertMockEndpointsSatisfied();
 
@@ -69,11 +69,11 @@
         return new RouteBuilder() {
             public void configure() throws Exception {
                 // lets setup the heartbeats
-                from("bean:service1?method=status?initialDelay=100&exchangePattern=InOnly").to("activemq:topic:registry.heartbeats");
-                from("bean:service2?method=status?initialDelay=125&exchangePattern=InOnly").to("activemq:topic:registry.heartbeats");
-                from("bean:service3?method=status?initialDelay=150&exchangePattern=InOnly").to("activemq:topic:registry.heartbeats");
+                from("bean:service1?method=status").inOnly().to("activemq:topic:registry.heartbeats");
+                from("bean:service2?method=status").inOnly().to("activemq:topic:registry.heartbeats");
+                from("bean:service3?method=status").inOnly().to("activemq:topic:registry.heartbeats");
 
-                from("activemq:topic:registry.heartbeats?cacheLevelName=CACHE_CONSUMER").to("bean:registry?method=onEvent",
"mock:result");
+                from("activemq:topic:registry.heartbeats").to("bean:registry?method=onEvent",
"mock:result");
             }
         };
     }

Modified: camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/test/TestEndpointTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/test/TestEndpointTest.java?rev=790554&r1=790553&r2=790554&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/test/TestEndpointTest.java
(original)
+++ camel/trunk/components/camel-spring/src/test/java/org/apache/camel/component/test/TestEndpointTest.java
Thu Jul  2 11:43:27 2009
@@ -16,15 +16,8 @@
  */
 package org.apache.camel.component.test;
 
-import java.util.List;
-
 import org.apache.camel.CamelContext;
-import org.apache.camel.EndpointInject;
-import org.apache.camel.Exchange;
 import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.util.CamelContextHelper;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.test.context.ContextConfiguration;
 import org.springframework.test.context.junit38.AbstractJUnit38SpringContextTests;
@@ -34,28 +27,12 @@
  */
 @ContextConfiguration
 public class TestEndpointTest extends AbstractJUnit38SpringContextTests {
-    private static final transient Log LOG = LogFactory.getLog(TestEndpointTest.class);
 
     @Autowired
     protected CamelContext camelContext;
 
-    @EndpointInject(uri = "test:file://src/test/data?noop=true&idempotent=true&recursive=true&consumer.initialDelay=2000")
-    protected TestEndpoint endpoint;
-
     public void testMocksAreValid() throws Exception {
         assertNotNull(camelContext);
-        assertNotNull(endpoint);
-
         MockEndpoint.assertIsSatisfied(camelContext);
-
-        // lets show the endpoints in the test
-        List<MockEndpoint> list = CamelContextHelper.getSingletonEndpoints(camelContext,
MockEndpoint.class);
-        LOG.debug("Found endpoints: " + list);
-
-        // lets dump the messages sent to our test endpoint
-        List<Exchange> exchanges = endpoint.getReceivedExchanges();
-        for (Exchange exchange : exchanges) {
-            LOG.debug("Received: " + exchange);
-        }
     }
 }

Modified: camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/test/TestEndpointTest-context.xml
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/test/TestEndpointTest-context.xml?rev=790554&r1=790553&r2=790554&view=diff
==============================================================================
--- camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/test/TestEndpointTest-context.xml
(original)
+++ camel/trunk/components/camel-spring/src/test/resources/org/apache/camel/component/test/TestEndpointTest-context.xml
Thu Jul  2 11:43:27 2009
@@ -25,8 +25,8 @@
   <!-- START SNIPPET: example -->
   <camelContext xmlns="http://camel.apache.org/schema/spring">
     <route>
-      <from uri="file://src/test/data?noop=true&amp;idempotent=true&amp;recursive=true&amp;consumer.initialDelay=2000"/>
-        <to uri="test:file://src/test/data?noop=true&amp;idempotent=true&amp;recursive=true&amp;consumer.initialDelay=2000"/>
+      <from uri="file://src/test/data?noop=true&amp;readLock=none&amp;initialDelay=5000"/>
+        <to uri="test:file://src/test/data?noop=true&amp;readLock=none&amp;initialDelay=5000"/>
     </route>
   </camelContext>
   <!-- END SNIPPET: example -->

Modified: camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java?rev=790554&r1=790553&r2=790554&view=diff
==============================================================================
--- camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
(original)
+++ camel/trunk/examples/camel-example-reportincident/src/test/java/org/apache/camel/example/reportincident/ReportIncidentRoutesTest.java
Thu Jul  2 11:43:27 2009
@@ -84,8 +84,6 @@
 
         // assert mail box
         assertEquals("Should have got 1 mail", 1, inbox.size());
-        assertTrue(" We should get the email address from the mail ",
-                   ((String)inbox.get(0).getContent()).indexOf("- email: davsclaus@apache.org")
> 0);
 
         // stop camel
         stopCamel();



Mime
View raw message