Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
As part of AMQ-4286, I split up AbortSlowAckConsumerTest into 3 parts. AbortSlowAckConsumer0Test contains 3 new test cases and 1 test case that was overridden from it's base class, AbortSlowConsumerTest.
I don't think these tests ever actually ran though, perhaps because of a bug with CombinationTestSupport. As a result, this line of code in createBroker was never executed:
AbortSlowAckConsumerStrategy strategy = (AbortSlowAckConsumerStrategy) underTest;
This cast doesn't work, so I updated the corresponding code in AbortSlowAckConsumer0Test. The test now gets the errors below. I'm not sure if this is because of my conversion, or if they never would have worked. I will add @Ignore for now for all failing tests cases.
Running org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test
Tests run: 8, Failures: 4, Errors: 0, Skipped: 0, Time elapsed: 24.831 sec <<< FAILURE! - in org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test
testZeroPrefetchConsumerIsAborted(org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test) Time elapsed: 1.785 sec <<< FAILURE!
java.lang.AssertionError: Slow consumer not aborted.
at org.junit.Assert.fail(Assert.java:88)
at org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test.testZeroPrefetchConsumerIsAborted(AbortSlowAckConsumer0Test.java:104)
testIdleConsumerCanBeAborted(org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test) Time elapsed: 0.099 sec <<< FAILURE!
java.lang.AssertionError: Slow consumer not aborted.
at org.junit.Assert.fail(Assert.java:88)
at org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test.testIdleConsumerCanBeAborted(AbortSlowAckConsumer0Test.java:152)
testIdleConsumerCanBeAbortedNoMessages(org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test) Time elapsed: 0.109 sec <<< FAILURE!
java.lang.AssertionError: Idle consumer not aborted.
at org.junit.Assert.fail(Assert.java:88)
at org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test.testIdleConsumerCanBeAbortedNoMessages(AbortSlowAckConsumer0Test.java:126)
testSlowConsumerIsAbortedViaJmx(org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test) Time elapsed: 8.073 sec <<< FAILURE!
java.lang.AssertionError: one slow consumers expected:<1> but was:<0>
at org.junit.Assert.fail(Assert.java:88)
at org.junit.Assert.failNotEquals(Assert.java:743)
at org.junit.Assert.assertEquals(Assert.java:118)
at org.junit.Assert.assertEquals(Assert.java:555)
at org.apache.activemq.broker.policy.AbortSlowConsumer0Test.testSlowConsumerIsAbortedViaJmx(AbortSlowConsumer0Test.java:99)
at org.apache.activemq.broker.policy.AbortSlowAckConsumer0Test.testSlowConsumerIsAbortedViaJmx(AbortSlowAckConsumer0Test.java:84)