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 2012/02/04 00:46:27 UTC
svn commit: r1240408 -
/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java
Author: hadrian
Date: Fri Feb 3 23:46:27 2012
New Revision: 1240408
URL: http://svn.apache.org/viewvc?rev=1240408&view=rev
Log:
Fix checkstyle and dependency problem from previous commit
Modified:
camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java
Modified: camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java?rev=1240408&r1=1240407&r2=1240408&view=diff
==============================================================================
--- camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java (original)
+++ camel/trunk/tests/camel-itest/src/test/java/org/apache/camel/itest/issues/RemoveEndpointsTest.java Fri Feb 3 23:46:27 2012
@@ -16,18 +16,16 @@
*/
package org.apache.camel.itest.issues;
-import static org.apache.camel.component.jms.JmsComponent.jmsComponentAutoAcknowledge;
-
import java.util.Collection;
-import javax.jms.ConnectionFactory;
+import javax.naming.Context;
-import org.apache.camel.CamelContext;
+import org.apache.activemq.camel.component.ActiveMQComponent;
import org.apache.camel.Endpoint;
import org.apache.camel.builder.RouteBuilder;
-import org.apache.camel.component.jms.CamelJmsTestHelper;
import org.apache.camel.component.mock.MockEndpoint;
import org.apache.camel.test.junit4.CamelTestSupport;
+import org.apache.camel.util.jndi.JndiContext;
import org.junit.Test;
/**
@@ -52,13 +50,15 @@ public class RemoveEndpointsTest extends
// assertNull(context.hasEndpoint("jms://topic:bar"));
}
- protected CamelContext createCamelContext() throws Exception {
- CamelContext camelContext = super.createCamelContext();
-
- ConnectionFactory connectionFactory = CamelJmsTestHelper.createConnectionFactory();
- camelContext.addComponent("jms", jmsComponentAutoAcknowledge(connectionFactory));
+ @Override
+ protected Context createJndiContext() throws Exception {
+ JndiContext answer = new JndiContext();
- return camelContext;
+ // add ActiveMQ with embedded broker
+ ActiveMQComponent amq = ActiveMQComponent.activeMQComponent("vm://localhost?broker.persistent=false");
+ amq.setCamelContext(context);
+ answer.bind("jms", amq);
+ return answer;
}
@Override