You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ha...@apache.org on 2011/09/01 17:58:26 UTC
svn commit: r1164124 - in
/camel/trunk/camel-core/src/test/java/org/apache/camel/impl:
DefaultCamelContextEndpointCacheLimitTest.java
DefaultCamelContextEndpointCacheTest.java MultipleConsumersSupportTest.java
Author: hadrian
Date: Thu Sep 1 15:58:25 2011
New Revision: 1164124
URL: http://svn.apache.org/viewvc?rev=1164124&view=rev
Log:
CAMEL-4394. A few other tests with invalid URIs (using no component)
Modified:
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleConsumersSupportTest.java
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java?rev=1164124&r1=1164123&r2=1164124&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheLimitTest.java Thu Sep 1 15:58:25 2011
@@ -36,7 +36,7 @@ public class DefaultCamelContextEndpoint
public void testCacheEndpoints() throws Exception {
// test that we cache at most 75 endpoints in camel context to avoid it eating to much memory
for (int i = 0; i < 78; i++) {
- String uri = "myendpoint?id=" + i;
+ String uri = "my:endpoint?id=" + i;
DefaultEndpoint e = new DefaultEndpoint() {
// FIXME: another endpoint that works without a Component
public Producer createProducer() throws Exception {
@@ -58,8 +58,8 @@ public class DefaultCamelContextEndpoint
Collection<Endpoint> col = context.getEndpoints();
assertEquals("Size should be 75", 75, col.size());
List<Endpoint> list = new ArrayList<Endpoint>(col);
- assertEquals("myendpoint?id=3", list.get(0).getEndpointUri());
- assertEquals("myendpoint?id=77", list.get(74).getEndpointUri());
+ assertEquals("my:endpoint?id=3", list.get(0).getEndpointUri());
+ assertEquals("my:endpoint?id=77", list.get(74).getEndpointUri());
}
@Override
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java?rev=1164124&r1=1164123&r2=1164124&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/DefaultCamelContextEndpointCacheTest.java Thu Sep 1 15:58:25 2011
@@ -34,7 +34,7 @@ public class DefaultCamelContextEndpoint
public void testCacheEndpoints() throws Exception {
// test that we cache at most 1000 endpoints in camel context to avoid it eating to much memory
for (int i = 0; i < 1003; i++) {
- String uri = "myendpoint?id=" + i;
+ String uri = "my:endpoint?id=" + i;
DefaultEndpoint e = new DefaultEndpoint() {
// FIXME: another endpoint that works without a Component
public Producer createProducer() throws Exception {
@@ -56,8 +56,8 @@ public class DefaultCamelContextEndpoint
Collection<Endpoint> col = context.getEndpoints();
assertEquals("Size should be 1000", 1000, col.size());
List<Endpoint> list = new ArrayList<Endpoint>(col);
- assertEquals("myendpoint?id=3", list.get(0).getEndpointUri());
- assertEquals("myendpoint?id=1002", list.get(999).getEndpointUri());
+ assertEquals("my:endpoint?id=3", list.get(0).getEndpointUri());
+ assertEquals("my:endpoint?id=1002", list.get(999).getEndpointUri());
}
}
Modified: camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleConsumersSupportTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleConsumersSupportTest.java?rev=1164124&r1=1164123&r2=1164124&view=diff
==============================================================================
--- camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleConsumersSupportTest.java (original)
+++ camel/trunk/camel-core/src/test/java/org/apache/camel/impl/MultipleConsumersSupportTest.java Thu Sep 1 15:58:25 2011
@@ -39,6 +39,8 @@ public class MultipleConsumersSupportTes
@Override
public void configure() throws Exception {
MyEndpoint my = new MyEndpoint();
+ my.setCamelContext(context);
+ my.setEndpointUriIfNotSpecified("my:endpoint");
from(my).to("mock:a");
@@ -51,7 +53,7 @@ public class MultipleConsumersSupportTes
context.start();
fail("Should have thrown exception");
} catch (FailedToStartRouteException e) {
- assertTrue(e.getMessage().endsWith("Multiple consumers for the same endpoint is not allowed: Endpoint[MyEndpoint]"));
+ assertTrue(e.getMessage().endsWith("Multiple consumers for the same endpoint is not allowed: Endpoint[my:endpoint]"));
}
}