Repository: activemq Updated Branches: refs/heads/activemq-5.15.x a0a240372 -> 9683ae3f5
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 (cherry picked from commit 84126d8a7a7eb9faf44bef687dcf647e84173f22) Project: http://git-wip-us.apache.org/repos/asf/activemq/repo Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/9683ae3f Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/9683ae3f Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/9683ae3f Branch: refs/heads/activemq-5.15.x Commit: 9683ae3f5dacdbcde470e9bc8cbb5263e465560c Parents: a0a2403 Author: Christopher L. Shannon (cshannon) <christopher.l.shan...@gmail.com> Authored: Fri Mar 30 06:34:36 2018 -0400 Committer: Christopher L. Shannon (cshannon) <christopher.l.shan...@gmail.com> Committed: Fri Mar 30 06:35:52 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/9683ae3f/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"); }