activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tab...@apache.org
Subject git commit: Fix test failure under Java 8. Root cause is in CombinationTestSupport and only shows up in Java 8 because iteration order of the options map changes such that the expandCombination method gets an empty value for an option and returns immedi
Date Thu, 07 Aug 2014 20:59:05 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk 533cedc4f -> 1f9a2d6f6


Fix test failure under Java 8.  Root cause is in CombinationTestSupport
and only shows up in Java 8 because iteration order of the options map
changes such that the expandCombination method gets an empty value for
an option and returns immediately without evalutating all the added
options.

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

Branch: refs/heads/trunk
Commit: 1f9a2d6f6859f60c2340439d7188f70b8fa00ee0
Parents: 533cedc
Author: Timothy Bish <tabish121@gmail.com>
Authored: Thu Aug 7 16:58:49 2014 -0400
Committer: Timothy Bish <tabish121@gmail.com>
Committed: Thu Aug 7 16:58:49 2014 -0400

----------------------------------------------------------------------
 .../security/SimpleAnonymousPluginTest.java       | 18 ++++++++----------
 1 file changed, 8 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/1f9a2d6f/activemq-unit-tests/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
b/activemq-unit-tests/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
index 2e0fa27..c97515e 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/security/SimpleAnonymousPluginTest.java
@@ -63,7 +63,6 @@ public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest
{
         }
     }
 
-
     public void testAnonymousReceiveSucceeds() throws JMSException {
         doReceive(false);
     }
@@ -84,8 +83,8 @@ public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest
{
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestAnonymousReceiveSucceeds() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
+        addCombinationValues("userName", new Object[] { null });
+        addCombinationValues("password", new Object[] { null });
         addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"),
new ActiveMQTopic("GUEST.BAR")});
     }
 
@@ -93,8 +92,8 @@ public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest
{
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestAnonymousReceiveFails() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
+        addCombinationValues("userName", new Object[] { null });
+        addCombinationValues("password", new Object[] { null });
         addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new
ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO") });
     }
 
@@ -102,8 +101,8 @@ public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest
{
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestAnonymousSendFails() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
+        addCombinationValues("userName", new Object[] { null });
+        addCombinationValues("password", new Object[] { null });
         addCombinationValues("destination", new Object[] {new ActiveMQQueue("TEST"), new
ActiveMQTopic("TEST"), new ActiveMQQueue("USERS.FOO"), new ActiveMQTopic("USERS.FOO")});
     }
 
@@ -111,9 +110,8 @@ public class SimpleAnonymousPluginTest extends SimpleAuthenticationPluginTest
{
      * @see {@link CombinationTestSupport}
      */
     public void initCombosForTestAnonymousSendSucceeds() {
-        addCombinationValues("userName", new Object[] {});
-        addCombinationValues("password", new Object[] {});
+        addCombinationValues("userName", new Object[] { null });
+        addCombinationValues("password", new Object[] { null });
         addCombinationValues("destination", new Object[] {new ActiveMQQueue("GUEST.BAR"),
new ActiveMQTopic("GUEST.BAR")});
     }
-
 }


Mime
View raw message