activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: https://issues.apache.org/jira/browse/AMQ-4725
Date Wed, 18 Sep 2013 14:27:36 GMT
Updated Branches:
  refs/heads/trunk 5215fc21d -> e6e7ba7e4


https://issues.apache.org/jira/browse/AMQ-4725

Enable all tests now that things are fixed. 

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

Branch: refs/heads/trunk
Commit: e6e7ba7e448f48c9c1f8a6db891a410c7a0f5b8e
Parents: 5215fc2
Author: Timothy Bish <tabish121@gmai.com>
Authored: Wed Sep 18 10:27:26 2013 -0400
Committer: Timothy Bish <tabish121@gmai.com>
Committed: Wed Sep 18 10:27:26 2013 -0400

----------------------------------------------------------------------
 .../transport/failover/FailoverUriTest.java     |  34 ++--
 .../transport/tcp/TransportUriTest.java         | 182 +++++++++----------
 2 files changed, 108 insertions(+), 108 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/e6e7ba7e/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
index a77dd01..20a33ff 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/failover/FailoverUriTest.java
@@ -22,27 +22,27 @@ import org.apache.activemq.transport.tcp.TransportUriTest;
 
 public class FailoverUriTest extends TransportUriTest {
 
+    @Override
     public void initCombosForTestUriOptionsWork() {
-		addCombinationValues("prefix", new Object[]{"failover:(", "failover://("});
-		addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"
-				, "?wireFormat.tightEncodingEnabled=false)?jms.useAsyncSend=true&jms.copyMessageOnSend=false"
-				, "?wireFormat.maxInactivityDuration=0&keepAlive=true)?jms.prefetchPolicy.all=500&initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false"});
-	}
+        addCombinationValues("prefix", new Object[]{"failover:(", "failover://("});
+        addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"
+                , "?wireFormat.tightEncodingEnabled=false)?jms.useAsyncSend=true&jms.copyMessageOnSend=false"
+                , "?wireFormat.maxInactivityDuration=0&keepAlive=true)?jms.prefetchPolicy.all=500&initialReconnectDelay=10000&useExponentialBackOff=false&maxReconnectAttempts=0&randomize=false"});
+    }
 
-	public void initCombosForTestBadVersionNumberDoesNotWork() {
-		addCombinationValues("prefix", new Object[]{"failover:("});
-		// TODO uncomment after fixing https://issues.apache.org/jira/browse/AMQ-4725
-		// addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"});
-	}
+    @Override
+    public void initCombosForTestBadVersionNumberDoesNotWork() {
+        addCombinationValues("prefix", new Object[]{"failover:("});
+        addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"});
+    }
 
-	public void initCombosForTestBadPropertyNameFails() {
-		addCombinationValues("prefix", new Object[]{"failover:("});
-        // TODO uncomment after fixing https://issues.apache.org/jira/browse/AMQ-4725
-		//addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"});
-	}
+    @Override
+    public void initCombosForTestBadPropertyNameFails() {
+        addCombinationValues("prefix", new Object[]{"failover:("});
+        addCombinationValues("postfix", new Object[] {")?initialReconnectDelay=1000&maxReconnectDelay=1000"});
+    }
 
-	
     public static Test suite() {
-    	return suite(FailoverUriTest.class);
+        return suite(FailoverUriTest.class);
     }
 }

http://git-wip-us.apache.org/repos/asf/activemq/blob/e6e7ba7e/activemq-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
index 19380e5..349c5c3 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/transport/tcp/TransportUriTest.java
@@ -41,84 +41,84 @@ public class TransportUriTest extends EmbeddedBrokerTestSupport {
     public String prefix;
     public String postfix;
 
-//    public void initCombosForTestUriOptionsWork() {
-//        initSharedCombos();
-//    }
-//
-//    public void testUriOptionsWork() throws Exception {
-//        String uri = prefix + bindAddress + postfix;
-//        LOG.info("Connecting via: " + uri);
-//
-//        connection = new ActiveMQConnectionFactory(uri).createConnection();
-//        connection.start();
-//    }
-//
-//    public void initCombosForTestValidDiffServOptionsWork() {
-//        initSharedCombos();
-//    }
-//
-//    public void testValidDiffServOptionsWork() throws Exception {
-//        String[] validIntegerOptions = {"0", "1", "32", "62", "63"};
-//        for (String opt : validIntegerOptions) {
-//            testValidOptionsWork(DIFF_SERV + opt, "");
-//        }
-//        String[] validNameOptions = { "CS0", "CS1", "CS2", "CS3", "CS4", "CS5", "CS6",
-//                "CS7", "EF", "AF11", "AF12","AF13", "AF21", "AF22", "AF23", "AF31",
-//                "AF32", "AF33", "AF41", "AF42", "AF43" };
-//        for (String opt : validNameOptions) {
-//            testValidOptionsWork(DIFF_SERV + opt, "");
-//        }
-//    }
-//
-//    public void initCombosForTestInvalidDiffServOptionDoesNotWork() {
-//        initSharedCombos();
-//    }
-//
-//    public void testInvalidDiffServOptionsDoesNotWork() throws Exception {
-//        String[] invalidIntegerOptions = {"-2", "-1", "64", "65", "100", "255"};
-//        for (String opt : invalidIntegerOptions) {
-//            testInvalidOptionsDoNotWork(DIFF_SERV + opt, "");
-//        }
-//        String[] invalidNameOptions = {"hi", "", "A", "AF", "-AF21"};
-//        for (String opt : invalidNameOptions) {
-//            testInvalidOptionsDoNotWork(DIFF_SERV + opt, "");
-//        }
-//    }
-//
-//    public void initCombosForTestValidTypeOfServiceOptionsWork() {
-//        initSharedCombos();
-//    }
-//
-//    public void testValidTypeOfServiceOptionsWork() throws Exception {
-//        int[] validOptions = {0, 1, 32, 100, 254, 255};
-//        for (int opt : validOptions) {
-//            testValidOptionsWork(TOS + opt, "");
-//        }
-//    }
-//
-//    public void initCombosForTestInvalidTypeOfServiceOptionDoesNotWork() {
-//        initSharedCombos();
-//    }
-//
-//    public void testInvalidTypeOfServiceOptionDoesNotWork() throws Exception {
-//        int[] invalidOptions = {-2, -1, 256, 257};
-//        for (int opt : invalidOptions) {
-//            testInvalidOptionsDoNotWork(TOS + opt, "");
-//        }
-//    }
-//
-//    public void initCombosForTestDiffServAndTypeOfServiceMutuallyExclusive() {
-//        initSharedCombos();
-//    }
-//
-//    public void testDiffServAndTypeServiceMutuallyExclusive() {
-//        String msg = "It should not be possible to set both Differentiated "
-//            + "Services and Type of Service options on the same connection "
-//            + "URI.";
-//        testInvalidOptionsDoNotWork(TOS + 32 + DIFF_SERV, msg);
-//        testInvalidOptionsDoNotWork(DIFF_SERV + 32 + TOS + 32, msg);
-//    }
-//
+    public void initCombosForTestUriOptionsWork() {
+        initSharedCombos();
+    }
+
+    public void testUriOptionsWork() throws Exception {
+        String uri = prefix + bindAddress + postfix;
+        LOG.info("Connecting via: " + uri);
+
+        connection = new ActiveMQConnectionFactory(uri).createConnection();
+        connection.start();
+    }
+
+    public void initCombosForTestValidDiffServOptionsWork() {
+        initSharedCombos();
+    }
+
+    public void testValidDiffServOptionsWork() throws Exception {
+        String[] validIntegerOptions = {"0", "1", "32", "62", "63"};
+        for (String opt : validIntegerOptions) {
+            testValidOptionsWork(DIFF_SERV + opt, "");
+        }
+        String[] validNameOptions = { "CS0", "CS1", "CS2", "CS3", "CS4", "CS5", "CS6",
+                "CS7", "EF", "AF11", "AF12","AF13", "AF21", "AF22", "AF23", "AF31",
+                "AF32", "AF33", "AF41", "AF42", "AF43" };
+        for (String opt : validNameOptions) {
+            testValidOptionsWork(DIFF_SERV + opt, "");
+        }
+    }
+
+    public void initCombosForTestInvalidDiffServOptionDoesNotWork() {
+        initSharedCombos();
+    }
+
+    public void testInvalidDiffServOptionsDoesNotWork() throws Exception {
+        String[] invalidIntegerOptions = {"-2", "-1", "64", "65", "100", "255"};
+        for (String opt : invalidIntegerOptions) {
+            testInvalidOptionsDoNotWork(DIFF_SERV + opt, "");
+        }
+        String[] invalidNameOptions = {"hi", "", "A", "AF", "-AF21"};
+        for (String opt : invalidNameOptions) {
+            testInvalidOptionsDoNotWork(DIFF_SERV + opt, "");
+        }
+    }
+
+    public void initCombosForTestValidTypeOfServiceOptionsWork() {
+        initSharedCombos();
+    }
+
+    public void testValidTypeOfServiceOptionsWork() throws Exception {
+        int[] validOptions = {0, 1, 32, 100, 254, 255};
+        for (int opt : validOptions) {
+            testValidOptionsWork(TOS + opt, "");
+        }
+    }
+
+    public void initCombosForTestInvalidTypeOfServiceOptionDoesNotWork() {
+        initSharedCombos();
+    }
+
+    public void testInvalidTypeOfServiceOptionDoesNotWork() throws Exception {
+        int[] invalidOptions = {-2, -1, 256, 257};
+        for (int opt : invalidOptions) {
+            testInvalidOptionsDoNotWork(TOS + opt, "");
+        }
+    }
+
+    public void initCombosForTestDiffServAndTypeOfServiceMutuallyExclusive() {
+        initSharedCombos();
+    }
+
+    public void testDiffServAndTypeServiceMutuallyExclusive() {
+        String msg = "It should not be possible to set both Differentiated "
+            + "Services and Type of Service options on the same connection "
+            + "URI.";
+        testInvalidOptionsDoNotWork(TOS + 32 + DIFF_SERV, msg);
+        testInvalidOptionsDoNotWork(DIFF_SERV + 32 + TOS + 32, msg);
+    }
+
     public void initCombosForTestBadVersionNumberDoesNotWork() {
         initSharedCombos();
     }
@@ -144,19 +144,19 @@ public class TransportUriTest extends EmbeddedBrokerTestSupport {
             {"?tcpNoDelay=true&keepAlive=true&soLinger=-1"});
     }
 
-//    private void testValidOptionsWork(String options, String msg) {
-//        String uri = prefix + bindAddress + postfix + options;
-//        LOG.info("Connecting via: " + uri);
-//
-//        try {
-//            connection = new ActiveMQConnectionFactory(uri).createConnection();
-//            connection.start();
-//        } catch (Exception unexpected) {
-//            fail("Valid options '" + options + "' on URI '" + uri + "' should "
-//                 + "not have caused an exception to be thrown. " + msg
-//                 + " Exception: " + unexpected);
-//        }
-//    }
+    private void testValidOptionsWork(String options, String msg) {
+        String uri = prefix + bindAddress + postfix + options;
+        LOG.info("Connecting via: " + uri);
+
+        try {
+            connection = new ActiveMQConnectionFactory(uri).createConnection();
+            connection.start();
+        } catch (Exception unexpected) {
+            fail("Valid options '" + options + "' on URI '" + uri + "' should "
+                 + "not have caused an exception to be thrown. " + msg
+                 + " Exception: " + unexpected);
+        }
+    }
 
     private void testInvalidOptionsDoNotWork(String options, String msg) {
         String uri = prefix + bindAddress + postfix + options;


Mime
View raw message