You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by gt...@apache.org on 2014/03/20 15:33:29 UTC

git commit: sanity check test of local host/port syntax with failover

Repository: activemq
Updated Branches:
  refs/heads/trunk cb6941ee0 -> af9134a4f


sanity check test of local host/port syntax with failover


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/af9134a4
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/af9134a4
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/af9134a4

Branch: refs/heads/trunk
Commit: af9134a4faf9b97d852b63c51d5b4a419543a106
Parents: cb6941e
Author: gtully <ga...@gmail.com>
Authored: Thu Mar 20 14:32:31 2014 +0000
Committer: gtully <ga...@gmail.com>
Committed: Thu Mar 20 14:32:31 2014 +0000

----------------------------------------------------------------------
 .../failover/FailoverTransportTest.java         | 26 ++++++++++++++++++++
 1 file changed, 26 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/af9134a4/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java
index ed912aa..fd130fc 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverTransportTest.java
@@ -127,6 +127,32 @@ public class FailoverTransportTest {
         assertNotNull("Should have received a Response", this.transport.request(info));
     }
 
+    @Test
+    public void testLocalhostPortSyntax() throws Exception {
+        transport = TransportFactory.connect(
+                new URI("failover://(tcp://localhost:1111/localhost:2111)"));
+
+        transport.setTransportListener(new TransportListener() {
+
+            public void onCommand(Object command) {
+            }
+
+            public void onException(IOException error) {
+            }
+
+            public void transportInterupted() {
+            }
+
+            public void transportResumed() {
+            }
+        });
+
+        failoverTransport = transport.narrow(FailoverTransport.class);
+
+        transport.start();
+
+    }
+
     protected Transport createTransport() throws Exception {
         Transport transport = TransportFactory.connect(
                 new URI("failover://(tcp://localhost:1234?transport.connectTimeout=10000)"));