Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-1935

o.j.r.test.interceptor.PriorityExecutionTest intermittent failures

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 3.6.2.Final, 4.0.0.Beta6
    • None
    • None
    • None

      The PriorityExecutionTest fails on Travis CI:

      testPriority(org.jboss.resteasy.test.interceptor.PriorityExecutionTest)  Time elapsed: 0.251 sec  <<< FAILURE!
      org.junit.ComparisonFailure: Wrong order of interceptor execution expected:<PriorityExecutionC[ontainerRequestFilterMin]> but was:<PriorityExecutionC[lientResponseFilterMax]>
      	at deployment.PriorityExecutionTest.war//org.junit.Assert.assertEquals(Assert.java:115)
      	at deployment.PriorityExecutionTest.war//org.jboss.resteasy.test.interceptor.PriorityExecutionTest.testPriority(PriorityExecutionTest.java:155)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
      	at deployment.PriorityExecutionTest.war//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$8$1.invoke(Arquillian.java:334)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.container.test.impl.execution.LocalTestExecuter.execute(LocalTestExecuter.java:57)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.container.test.impl.execution.ContainerTestExecuter.execute(ContainerTestExecuter.java:36)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:116)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:122)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:330)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:212)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:376)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:223)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:287)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.container.test.impl.execution.BeforeLifecycleEventExecuter.on(BeforeLifecycleEventExecuter.java:34)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.TestContextHandler.createTestContext(TestContextHandler.java:116)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.TestContextHandler.createClassContext(TestContextHandler.java:83)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.TestContextHandler.createSuiteContext(TestContextHandler.java:69)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:142)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:281)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:174)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:376)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:185)
      	at deployment.PriorityExecutionTest.war//org.junit.runners.ParentRunner.run(ParentRunner.java:363)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:140)
      	at deployment.PriorityExecutionTest.war//org.junit.runner.JUnitCore.run(JUnitCore.java:137)
      	at deployment.PriorityExecutionTest.war//org.junit.runner.JUnitCore.run(JUnitCore.java:115)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:61)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.executeTest(ServletTestRunner.java:139)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.execute(ServletTestRunner.java:117)
      	at deployment.PriorityExecutionTest.war//org.jboss.arquillian.protocol.servlet.runner.ServletTestRunner.doGet(ServletTestRunner.java:86)
      	at javax.servlet.api//javax.servlet.http.HttpServlet.service(HttpServlet.java:686)
      	at javax.servlet.api//javax.servlet.http.HttpServlet.service(HttpServlet.java:791)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletHandler.handleRequest(ServletHandler.java:74)
      	at io.undertow.servlet//io.undertow.servlet.handlers.security.ServletSecurityRoleHandler.handleRequest(ServletSecurityRoleHandler.java:62)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletChain$1.handleRequest(ServletChain.java:67)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletDispatchingHandler.handleRequest(ServletDispatchingHandler.java:36)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.security.SecurityContextAssociationHandler.handleRequest(SecurityContextAssociationHandler.java:78)
      	at io.undertow.core@2.0.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet//io.undertow.servlet.handlers.security.SSLInformationAssociationHandler.handleRequest(SSLInformationAssociationHandler.java:131)
      	at io.undertow.servlet//io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:57)
      	at io.undertow.core@2.0.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.core@2.0.0.Final//io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:46)
      	at io.undertow.servlet//io.undertow.servlet.handlers.security.ServletConfidentialityConstraintHandler.handleRequest(ServletConfidentialityConstraintHandler.java:64)
      	at io.undertow.core@2.0.0.Final//io.undertow.security.handlers.AuthenticationMechanismsHandler.handleRequest(AuthenticationMechanismsHandler.java:60)
      	at io.undertow.servlet//io.undertow.servlet.handlers.security.CachedAuthenticatedSessionHandler.handleRequest(CachedAuthenticatedSessionHandler.java:77)
      	at io.undertow.core@2.0.0.Final//io.undertow.security.handlers.NotificationReceiverHandler.handleRequest(NotificationReceiverHandler.java:50)
      	at io.undertow.core@2.0.0.Final//io.undertow.security.handlers.AbstractSecurityContextAssociationHandler.handleRequest(AbstractSecurityContextAssociationHandler.java:43)
      	at io.undertow.core@2.0.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.security.jacc.JACCContextIdHandler.handleRequest(JACCContextIdHandler.java:61)
      	at io.undertow.core@2.0.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.GlobalRequestControllerHandler.handleRequest(GlobalRequestControllerHandler.java:68)
      	at io.undertow.core@2.0.0.Final//io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.handleFirstRequest(ServletInitialHandler.java:292)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.access$100(ServletInitialHandler.java:81)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:138)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler$2.call(ServletInitialHandler.java:135)
      	at io.undertow.servlet//io.undertow.servlet.core.ServletRequestContextThreadSetupAction$1.call(ServletRequestContextThreadSetupAction.java:48)
      	at io.undertow.servlet//io.undertow.servlet.core.ContextClassLoaderSetupAction$1.call(ContextClassLoaderSetupAction.java:43)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.security.SecurityContextThreadSetupAction.lambda$create$0(SecurityContextThreadSetupAction.java:105)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
      	at org.wildfly.extension.undertow//org.wildfly.extension.undertow.deployment.UndertowDeploymentInfoService$UndertowThreadSetupAction.lambda$create$0(UndertowDeploymentInfoService.java:1526)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.dispatchRequest(ServletInitialHandler.java:272)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler.access$000(ServletInitialHandler.java:81)
      	at io.undertow.servlet//io.undertow.servlet.handlers.ServletInitialHandler$1.handleRequest(ServletInitialHandler.java:104)
      	at io.undertow.core@2.0.0.Final//io.undertow.server.Connectors.executeRootHandler(Connectors.java:360)
      	at io.undertow.core@2.0.0.Final//io.undertow.server.HttpServerExchange$1.run(HttpServerExchange.java:830)
      	at org.jboss.threads@2.3.1.Final//org.jboss.threads.ContextClassLoaderSavingRunnable.run(ContextClassLoaderSavingRunnable.java:35)
      	at org.jboss.threads@2.3.1.Final//org.jboss.threads.EnhancedQueueExecutor.safeRun(EnhancedQueueExecutor.java:1985)
      	at org.jboss.threads@2.3.1.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.doRunTask(EnhancedQueueExecutor.java:1487)
      	at org.jboss.threads@2.3.1.Final//org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1378)
      	at java.base/java.lang.Thread.run(Thread.java:844)
      

      The reason is likely the wrong assumption that the ResteasyProviderFactory retrieved in the testPriority() method is the same that's been used when application has been deployed. If the assumption is not correct, the container filters are added to a different factory and hence they're not run.
      The test likely needs to be re-written properly.

              mkopecky@redhat.com Marek Kopecky
              rhn-support-asoldano Alessio Soldano
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: