camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1132659 - /camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
Date Mon, 06 Jun 2011 14:42:00 GMT
Author: davsclaus
Date: Mon Jun  6 14:42:00 2011
New Revision: 1132659

URL: http://svn.apache.org/viewvc?rev=1132659&view=rev
Log:
CAMEL-4059: Fixed test on windows

Modified:
    camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java

Modified: camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java?rev=1132659&r1=1132658&r2=1132659&view=diff
==============================================================================
--- camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
(original)
+++ camel/trunk/components/camel-jms/src/test/java/org/apache/camel/component/jms/JmsTestConnectionOnStartupTest.java
Mon Jun  6 14:42:00 2011
@@ -46,7 +46,6 @@ public class JmsTestConnectionOnStartupT
             context.start();
             fail("Should have thrown an exception");
         } catch (FailedToCreateConsumerException e) {
-            // expected
             assertEquals("Failed to create Consumer for endpoint: Endpoint[activemq://queue:foo?testConnectionOnStartup=true].
"
                 + "Reason: Cannot get JMS Connection on startup for destination foo", e.getMessage());
         }
@@ -65,12 +64,8 @@ public class JmsTestConnectionOnStartupT
             context.start();
             fail("Should have thrown an exception");
         } catch (FailedToCreateProducerException e) {
-            // expected
-            assertEquals("Failed to create Producer for endpoint: Endpoint[activemq://queue:foo?testConnectionOnStartup=true].
"
-                + "Reason: org.apache.camel.FailedToCreateProducerException: Failed to create
Producer for endpoint: "
-                + "Endpoint[activemq://queue:foo?testConnectionOnStartup=true]. Reason: javax.jms.JMSException:
"
-                + "Could not connect to broker URL: tcp://localhost:61111. Reason: java.net.ConnectException:
Connection refused",
-                    e.getMessage());
+            assertTrue(e.getMessage().startsWith("Failed to create Producer for endpoint:
Endpoint[activemq://queue:foo?testConnectionOnStartup=true]."));
+            assertTrue(e.getMessage().contains("java.net.ConnectException"));
         }
     }
 



Mime
View raw message