1 Reply Latest reply on Jun 11, 2007 12:14 PM by Tim Fox

    Broken test ConnectionClosedTest.testCloseWhileReceiving

    Sergey Koshcheyev Newbie

      The test fails saying "Timed out". I see this exception in the logs:

      11:24:32,828 TRACE @main [ClosedInterceptor] Failed to close
      javax.jms.IllegalStateException: Consumer is currently in receive(..). Cannot set MessageListener
       at org.jboss.jms.client.remoting.MessageCallbackHandler.setMessageListener(MessageCallbackHandler.java:273)
       at org.jboss.jms.client.remoting.MessageCallbackHandler.close(MessageCallbackHandler.java:334)
       at org.jboss.jms.client.container.ConsumerAspect.handleClosing(ConsumerAspect.java:134)
       at org.jboss.aop.advice.org.jboss.jms.client.container.ConsumerAspect36.invoke(ConsumerAspect36.java)
       at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_N1847373599029068216.invokeNext(ClientConsumerDelegate$closing_N1847373599029068216.java)
       at org.jboss.jms.client.container.FailoverValveInterceptor.invoke(FailoverValveInterceptor.java:91)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_N1847373599029068216.invokeNext(ClientConsumerDelegate$closing_N1847373599029068216.java)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:170)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientConsumerDelegate$closing_N1847373599029068216.invokeNext(ClientConsumerDelegate$closing_N1847373599029068216.java)
       at org.jboss.jms.client.delegate.ClientConsumerDelegate.closing(ClientConsumerDelegate.java)
       at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:308)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:165)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientSessionDelegate$closing_N1847373599029068216.invokeNext(ClientSessionDelegate$closing_N1847373599029068216.java)
       at org.jboss.jms.client.delegate.ClientSessionDelegate.closing(ClientSessionDelegate.java)
       at org.jboss.jms.client.container.ClosedInterceptor.maintainRelatives(ClosedInterceptor.java:308)
       at org.jboss.jms.client.container.ClosedInterceptor.invoke(ClosedInterceptor.java:165)
       at org.jboss.aop.advice.PerInstanceInterceptor.invoke(PerInstanceInterceptor.java:105)
       at org.jboss.jms.client.delegate.ClientConnectionDelegate$closing_N1847373599029068216.invokeNext(ClientConnectionDelegate$closing_N1847373599029068216.java)
       at org.jboss.jms.client.delegate.ClientConnectionDelegate.closing(ClientConnectionDelegate.java)
       at org.jboss.jms.client.JBossConnection.close(JBossConnection.java:131)
       at org.jboss.test.messaging.jms.ConnectionClosedTest.testCloseWhileReceiving(ConnectionClosedTest.java:244)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
       at java.lang.reflect.Method.invoke(Method.java:585)
       at junit.framework.TestCase.runTest(TestCase.java:164)
       at junit.framework.TestCase.runBare(TestCase.java:130)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:120)
       at junit.framework.TestSuite.runTest(TestSuite.java:230)
       at junit.framework.TestSuite.run(TestSuite.java:225)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:421)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:912)
       at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:766)
      


      There's a comment above the throw statement saying "Should never happen", but apparently it does. This seems to be related to revision 2761, see http://fisheye.jboss.com/changelog/Messaging?cs=2761.