You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cs...@apache.org on 2018/03/30 10:35:36 UTC

activemq git commit: AMQ-6940 - test fix for AMQ6477 test

Repository: activemq
Updated Branches:
  refs/heads/master 65b0f2ad0 -> 84126d8a7


AMQ-6940 - test fix for AMQ6477 test

Need to remove the portion of the test that looks at the dispatched list
for TopicSubscription as that class no longer tracks message references


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

Branch: refs/heads/master
Commit: 84126d8a7a7eb9faf44bef687dcf647e84173f22
Parents: 65b0f2a
Author: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Authored: Fri Mar 30 06:34:36 2018 -0400
Committer: Christopher L. Shannon (cshannon) <ch...@gmail.com>
Committed: Fri Mar 30 06:34:36 2018 -0400

----------------------------------------------------------------------
 .../org/apache/activemq/usecases/AMQ6477Test.java   | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/84126d8a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/AMQ6477Test.java
----------------------------------------------------------------------
diff --git a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/AMQ6477Test.java b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/AMQ6477Test.java
index 50292c1..f8b3243 100644
--- a/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/AMQ6477Test.java
+++ b/activemq-unit-tests/src/test/java/org/apache/activemq/usecases/AMQ6477Test.java
@@ -77,16 +77,18 @@ public class AMQ6477Test {
     private SubType subType;
     private boolean persistent;
 
-    protected enum SubType {QUEUE, TOPIC, DURABLE};
+    protected enum SubType {QUEUE, TOPIC, DURABLE}
 
     @Parameters(name="subType={0},isPersistent={1}")
     public static Collection<Object[]> data() {
         return Arrays.asList(new Object[][] {
                 {SubType.QUEUE, false},
-                {SubType.TOPIC, false},
+                //Can only test PrefetchSubscriptions for now as TopicSubscriptions don't track the message
+                //references anymore that are dispatched
+               // {SubType.TOPIC, false},
                 {SubType.DURABLE, false},
                 {SubType.QUEUE, true},
-                {SubType.TOPIC, true},
+               // {SubType.TOPIC, true},
                 {SubType.DURABLE, true}
             });
     }
@@ -177,11 +179,9 @@ public class AMQ6477Test {
     protected List<MessageReference> getSubscriptionMessages(Subscription sub) throws Exception {
         Field dispatchedField = null;
         Field dispatchLockField = null;
-
-        if (sub instanceof TopicSubscription) {
-            dispatchedField = TopicSubscription.class.getDeclaredField("dispatched");
-            dispatchLockField = TopicSubscription.class.getDeclaredField("dispatchLock");
-        } else {
+        //Can only test PrefetchSubscriptions for now as TopicSubscriptions don't track the message
+        //references anymore that are dispatched
+        if (sub instanceof PrefetchSubscription) {
             dispatchedField = PrefetchSubscription.class.getDeclaredField("dispatched");
             dispatchLockField = PrefetchSubscription.class.getDeclaredField("dispatchLock");
         }