activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject svn commit: r1084379 - /activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java
Date Tue, 22 Mar 2011 22:23:14 GMT
Author: tabish
Date: Tue Mar 22 22:23:14 2011
New Revision: 1084379

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

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

Modified: activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java?rev=1084379&r1=1084378&r2=1084379&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java (original)
+++ activemq/trunk/activemq-core/src/test/java/org/apache/activemq/bugs/AMQ2751Test.java Tue
Mar 22 22:23:14 2011
@@ -42,7 +42,8 @@ public class AMQ2751Test extends Embedde
     public void testRecoverRedelivery() throws Exception {
 
         final CountDownLatch redelivery = new CountDownLatch(6);
-        final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory("failover:("
+ this.bindAddress + ")");
+        final ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory(
+                "failover:(" + broker.getTransportConnectors().get(0).getConnectUri() + ")");
         try {
 
             Connection connection = factory.createConnection();
@@ -62,7 +63,7 @@ public class AMQ2751Test extends Embedde
                         if (message.getJMSRedelivered()) {
                             LOG.info("It's a redelivery.");
                             redelivery.countDown();
-                        } 
+                        }
                         LOG.info("calling recover() on the session to force redelivery.");
                         session.recover();
                     } catch (JMSException e) {
@@ -76,7 +77,7 @@ public class AMQ2751Test extends Embedde
 
             MessageProducer producer = session.createProducer(queue);
             producer.send(session.createTextMessage("test"));
-            
+
             assertTrue("we got 6 redeliveries", redelivery.await(20, TimeUnit.SECONDS));
 
         } finally {
@@ -87,7 +88,7 @@ public class AMQ2751Test extends Embedde
 
     @Override
     protected void setUp() throws Exception {
-        bindAddress = "tcp://0.0.0.0:61617";
+        bindAddress = "tcp://localhost:0";
         super.setUp();
     }
 }



Mime
View raw message