Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5062

JMSClientNioTest fails intermittently

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.9.0
    • 5.10.0
    • AMQP
    • None
    • Unit Test Broken

    Description

      I'm not sure whether this is just a test issue. All test cases pass if run individually, and sometimes the whole test suite passes. Other times, however, it gets errors like those shown below. Depending on the run, different test cases will fail.

      -------------------------------------------------------
      T E S T S
      -------------------------------------------------------
      Running org.apache.activemq.transport.amqp.JMSClientNioTest
      Tests run: 21, Failures: 3, Errors: 1, Skipped: 0, Time elapsed: 343.636 sec <<< FAILURE! - in org.apache.activemq.transport.amqp.JMSClientNioTest
      testExecptionListenerCalledOnBrokerStop(org.apache.activemq.transport.amqp.JMSClientNioTest) Time elapsed: 21.063 sec <<< FAILURE!
      java.lang.AssertionError: No exception listener event fired.
      at org.junit.Assert.fail(Assert.java:88)
      at org.junit.Assert.assertTrue(Assert.java:41)
      at org.apache.activemq.transport.amqp.JMSClientTest.testExecptionListenerCalledOnBrokerStop(JMSClientTest.java:715)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

      testTopicConsumerSync(org.apache.activemq.transport.amqp.JMSClientNioTest) Time elapsed: 77.172 sec <<< ERROR!
      java.lang.Exception: test timed out after 45000 milliseconds
      at java.lang.Object.wait(Native Method)
      at java.lang.Object.wait(Object.java:503)
      at org.apache.qpid.amqp_1_0.transport.ConnectionEndpoint.open(ConnectionEndpoint.java:154)
      at org.apache.qpid.amqp_1_0.client.Connection.<init>(Connection.java:284)
      at org.apache.qpid.amqp_1_0.client.Connection.<init>(Connection.java:143)
      at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.connect(ConnectionImpl.java:115)
      at org.apache.qpid.amqp_1_0.jms.impl.ConnectionImpl.start(ConnectionImpl.java:284)
      at org.apache.activemq.transport.amqp.JMSClientTest.createConnection(JMSClientTest.java:794)
      at org.apache.activemq.transport.amqp.JMSClientTest.createConnection(JMSClientTest.java:754)
      at org.apache.activemq.transport.amqp.JMSClientTest.testTopicConsumerSync(JMSClientTest.java:626)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

      testConsumerReceiveTimedThrowsWhenBrokerStops(org.apache.activemq.transport.amqp.JMSClientNioTest) Time elapsed: 12.525 sec <<< FAILURE!
      java.lang.AssertionError: Should have thrown an IllegalStateException
      at org.junit.Assert.fail(Assert.java:88)
      at org.apache.activemq.transport.amqp.JMSClientTest.testConsumerReceiveTimedThrowsWhenBrokerStops(JMSClientTest.java:411)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

      testConsumerReceiveNoWaitThrowsWhenBrokerStops(org.apache.activemq.transport.amqp.JMSClientNioTest) Time elapsed: 12.515 sec <<< FAILURE!
      java.lang.AssertionError: Should have thrown an IllegalStateException
      at org.junit.Assert.fail(Assert.java:88)
      at org.apache.activemq.transport.amqp.JMSClientTest.testConsumerReceiveNoWaitThrowsWhenBrokerStops(JMSClientTest.java:380)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:606)
      at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:47)
      at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:44)
      at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
      at org.junit.internal.runners.statements.FailOnTimeout$StatementThread.run(FailOnTimeout.java:74)

      Results :

      Failed tests:
      JMSClientNioTest>JMSClientTest.testExecptionListenerCalledOnBrokerStop:715 No exception listener event fired.
      JMSClientNioTest>JMSClientTest.testConsumerReceiveTimedThrowsWhenBrokerStops:411 Should have thrown an IllegalStateException
      JMSClientNioTest>JMSClientTest.testConsumerReceiveNoWaitThrowsWhenBrokerStops:380 Should have thrown an IllegalStateException

      Tests in error:
      JMSClientNioTest>JMSClientTest.testTopicConsumerSync:626->JMSClientTest.createConnection:754->JMSClientTest.createConnection:794->Object.wait:503->Object.wait:-2 ยป

      Tests run: 21, Failures: 3, Errors: 1, Skipped: 0

      Attachments

        Activity

          People

            kearls Kevin Anthony Earls
            kearls Kevin Anthony Earls
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: