Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-2869

Incorrect closing of JMS connections causes subsequent tests to fail

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Major
    • 9.0.0.Final
    • 8.0.0.CR1
    • Test Suite
    • None

    Description

      RunAsMDBUnitTestCase and GetCallerPrincipalTestCase call stop() to close a JMS connection, which is wrong, it should use close(). This causes the later running AuthenticationTestCase.testAuthentication_ReAuth_ViaServlet (or potentially other tests) to fail due to a timeout, having this in the log:

      0m19:53:28,973 INFO [org.jboss.arquillian.testenricher.cdi.container.BeanManagerProducer] (pool-1-thread-1) BeanManager not found.
      �[0m�[33m19:53:29,218 WARN [org.hornetq.core.client] (Finalizer) HQ212016: I am closing a core ClientSession you left open. Please make sure you close all ClientSessions explicitly before letting them go out of scope! 28,182,273: java.lang.Exception
      at org.hornetq.core.client.impl.DelegatingSession.<init>(DelegatingSession.java:91)
      at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSessionInternal(ClientSessionFactoryImpl.java:912)
      at org.hornetq.core.client.impl.ClientSessionFactoryImpl.createSession(ClientSessionFactoryImpl.java:317)
      at org.hornetq.jms.client.HornetQConnection.authorize(HornetQConnection.java:648)
      at org.hornetq.jms.client.HornetQConnectionFactory.createConnectionInternal(HornetQConnectionFactory.java:676)
      at org.hornetq.jms.client.HornetQConnectionFactory.createQueueConnection(HornetQConnectionFactory.java:119)
      at org.jboss.as.test.integration.ejb.security.callerprincipal.GetCallerPrincipalTestCase.testMDBLifecycle(GetCallerPrincipalTestCase.java:300)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_45]
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      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.jboss.arquillian.junit.Arquillian$6$1.invoke(Arquillian.java:270)
      at org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:60)
      at sun.reflect.GeneratedMethodAccessor33.invoke(Unknown Source) [:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:115)
      at org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:67)
      at org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:38)
      at sun.reflect.GeneratedMethodAccessor32.invoke(Unknown Source) [:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:99)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:81)
      at org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:89)
      at sun.reflect.GeneratedMethodAccessor10.invoke(Unknown Source) [:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:75)
      at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) [:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:60)
      at sun.reflect.GeneratedMethodAccessor8.invoke(Unknown Source) [:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      at org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:90)
      at org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:88)
      at org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:135)
      at org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:111)
      at org.jboss.arquillian.junit.Arquillian$6.evaluate(Arquillian.java:263)
      at org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:226)
      at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
      at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
      at org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:240)
      at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:271)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:70)
      at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:50)
      at org.junit.runners.ParentRunner$3.run(ParentRunner.java:238)
      at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:63)
      at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:236)
      at org.junit.runners.ParentRunner.access$000(ParentRunner.java:53)
      at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:229)
      at org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:185)
      at org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:314)
      at org.jboss.arquillian.junit.Arquillian.access$100(Arquillian.java:46)
      at org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:199)
      at org.junit.runners.ParentRunner.run(ParentRunner.java:309)
      at org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:147)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:160)
      at org.junit.runner.JUnitCore.run(JUnitCore.java:138)
      at org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:65)
      at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:128)
      at org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:107)
      at org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:214)
      at sun.reflect.GeneratedMethodAccessor24.invoke(Unknown Source) [:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:75) [:1.7.0_45]
      at sun.reflect.GeneratedMethodAccessor12.invoke(Unknown Source) [:1.7.0_45]
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_45]
      at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_45]
      at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:279) [rt.jar:1.7.0_45]
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112) [rt.jar:1.7.0_45]
      at com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46) [rt.jar:1.7.0_45]
      at com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237) [rt.jar:1.7.0_45]
      at com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138) [rt.jar:1.7.0_45]
      at com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252) [rt.jar:1.7.0_45]
      at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819) [rt.jar:1.7.0_45]
      at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801) [rt.jar:1.7.0_45]
      at org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:1469)
      at org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:730)
      at org.jboss.remotingjmx.protocol.v2.ServerProxy$InvokeHandler.handle(ServerProxy.java:952)
      at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
      at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:75)
      at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:70)
      at java.security.AccessController.doPrivileged(Native Method) [rt.jar:1.7.0_45]
      at javax.security.auth.Subject.doAs(Subject.java:415) [rt.jar:1.7.0_45]
      at org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:94)
      at org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:70)
      at org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_45]
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_45]
      at java.lang.Thread.run(Thread.java:744) [rt.jar:1.7.0_45]
      

      Attachments

        Activity

          People

            jmartisk@redhat.com Jan Martiska
            jmartisk@redhat.com Jan Martiska
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: