activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1084751 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java
Date Wed, 23 Mar 2011 21:24:46 GMT
Author: tabish
Date: Wed Mar 23 21:24:46 2011
New Revision: 1084751

URL: http://svn.apache.org/viewvc?rev=1084751&view=rev
Log:
Update the test so that its not dependant on port 61616

Modified:
    activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java?rev=1084751&r1=1084750&r2=1084751&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/TimeStampTest.java Wed
Mar 23 21:24:46 2011
@@ -27,6 +27,7 @@ import javax.jms.Session;
 import junit.framework.TestCase;
 import org.apache.activemq.broker.BrokerPlugin;
 import org.apache.activemq.broker.BrokerService;
+import org.apache.activemq.broker.TransportConnector;
 import org.apache.activemq.broker.util.UDPTraceBrokerPlugin;
 import org.apache.activemq.broker.view.ConnectionDotFilePlugin;
 
@@ -36,12 +37,13 @@ public class TimeStampTest extends TestC
         broker.setPersistent(false);
         broker.setUseJmx(true);
         broker.setPlugins(new BrokerPlugin[] {new ConnectionDotFilePlugin(), new UDPTraceBrokerPlugin()});
-        broker.addConnector("tcp://localhost:61616");
-        broker.addConnector("stomp://localhost:61613");
+        TransportConnector tcpConnector = broker.addConnector("tcp://localhost:0");
+        broker.addConnector("stomp://localhost:0");
         broker.start();
 
         // Create a ConnectionFactory
-        ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory("tcp://localhost:61616");
+        ActiveMQConnectionFactory connectionFactory =
+            new ActiveMQConnectionFactory(tcpConnector.getConnectUri());
 
         // Create a Connection
         Connection connection = connectionFactory.createConnection();



Mime
View raw message