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

LRA causes a failure in the ContextPropagationTestCase

XMLWordPrintable

    The ContextPropagationTestCase seems to occasionally fail on CI. it is failing consistently for me. The LRAParticipantService and LRACoordinatorService create RESTEasy servlets with the same name mapping. They also each create a new servlet container. The name is likely not the issue, but does seem it should be unique. The issue is likely the creation of a new servlet container in each service.

    The error looks something like:

    [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 37.762 s <<< FAILURE! - in org.wildfly.test.integration.observability.opentelemetry.ContextPropagationTestCase
    [ERROR] testContextPropagation(org.wildfly.test.integration.observability.opentelemetry.ContextPropagationTestCase)  Time elapsed: 30.83 s  <<< FAILURE!
    java.lang.AssertionError: 
    Failed to get expected spans. Got:
    Recording traceparent
    /ContextPropagationTestCase/contextProp2
    HTTP GET
    Making second request
    /ContextPropagationTestCase/contextProp1
    	at deployment.ContextPropagationTestCase.war//org.wildfly.test.integration.observability.opentelemetry.exporter.InMemorySpanExporter.assertSpanCount(InMemorySpanExporter.java:61)
    	at deployment.ContextPropagationTestCase.war//org.wildfly.test.integration.observability.opentelemetry.exporter.InMemorySpanExporter.getFinishedSpanItems(InMemorySpanExporter.java:50)
    	at deployment.ContextPropagationTestCase.war//org.wildfly.test.integration.observability.opentelemetry.exporter.InMemorySpanExporter$Proxy$_$$_WeldClientProxy.getFinishedSpanItems(Unknown Source)
    	at deployment.ContextPropagationTestCase.war//org.wildfly.test.integration.observability.opentelemetry.ContextPropagationTestCase.testContextPropagation(ContextPropagationTestCase.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:566)
    	at deployment.arquillian-service//org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:59)
    	at deployment.arquillian-service//org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
    	at deployment.arquillian-service//org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:56)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$8$1.invokeMethod(Arquillian.java:325)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.MethodInvoker$1.invoke(MethodInvoker.java:18)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventImpl.fire(EventImpl.java:62)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
    	at deployment.arquillian-service//org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.test(EventTestRunnerAdaptor.java:139)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.MethodInvoker.invoke(MethodInvoker.java:15)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$8.evaluate(Arquillian.java:332)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$4.evaluate(Arquillian.java:204)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:350)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$5.evaluate(Arquillian.java:215)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$7$1.invoke(Arquillian.java:279)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.invokeObservers(EventContextImpl.java:103)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:90)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
    	at deployment.arquillian-service//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:566)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ObserverImpl.invoke(ObserverImpl.java:86)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.EventContextImpl.proceed(EventContextImpl.java:95)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:133)
    	at deployment.arquillian-service//org.jboss.arquillian.core.impl.ManagerImpl.fire(ManagerImpl.java:105)
    	at deployment.arquillian-service//org.jboss.arquillian.test.impl.EventTestRunnerAdaptor.fireCustomLifecycle(EventTestRunnerAdaptor.java:159)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$7.evaluate(Arquillian.java:273)
    	at deployment.arquillian-service//org.junit.runners.BlockJUnit4ClassRunner$1.evaluate(BlockJUnit4ClassRunner.java:100)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:366)
    	at deployment.arquillian-service//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:103)
    	at deployment.arquillian-service//org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:63)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner$4.run(ParentRunner.java:331)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:79)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner.runChildren(ParentRunner.java:329)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner.access$100(ParentRunner.java:66)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:293)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$2.evaluate(Arquillian.java:166)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian.multiExecute(Arquillian.java:350)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian.access$200(Arquillian.java:54)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian$3.evaluate(Arquillian.java:177)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner$3.evaluate(ParentRunner.java:306)
    	at deployment.arquillian-service//org.junit.runners.ParentRunner.run(ParentRunner.java:413)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.Arquillian.run(Arquillian.java:115)
    	at deployment.arquillian-service//org.junit.runner.JUnitCore.run(JUnitCore.java:137)
    	at deployment.arquillian-service//org.junit.runner.JUnitCore.run(JUnitCore.java:115)
    	at deployment.arquillian-service//org.jboss.arquillian.junit.container.JUnitTestRunner.execute(JUnitTestRunner.java:61)
    	at deployment.arquillian-service//org.jboss.arquillian.protocol.jmx.JMXTestRunner.doRunTestMethod(JMXTestRunner.java:153)
    	at deployment.arquillian-service//org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.doRunTestMethod(ArquillianService.java:202)
    	at deployment.arquillian-service//org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethodInternal(JMXTestRunner.java:137)
    	at deployment.arquillian-service//org.jboss.arquillian.protocol.jmx.JMXTestRunner.runTestMethod(JMXTestRunner.java:119)
    	at deployment.arquillian-service//org.jboss.as.arquillian.service.ArquillianService$ExtendedJMXTestRunner.runTestMethod(ArquillianService.java:178)
    	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:566)
    	at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:71)
    	at jdk.internal.reflect.GeneratedMethodAccessor1.invoke(Unknown Source)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
    	at java.base/sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:260)
    	at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:112)
    	at java.management/com.sun.jmx.mbeanserver.StandardMBeanIntrospector.invokeM2(StandardMBeanIntrospector.java:46)
    	at java.management/com.sun.jmx.mbeanserver.MBeanIntrospector.invokeM(MBeanIntrospector.java:237)
    	at java.management/com.sun.jmx.mbeanserver.PerInterface.invoke(PerInterface.java:138)
    	at java.management/com.sun.jmx.mbeanserver.MBeanSupport.invoke(MBeanSupport.java:252)
    	at java.management/com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:809)
    	at java.management/com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:801)
    	at org.jboss.as.jmx@20.0.1.Final//org.jboss.as.jmx.PluggableMBeanServerImpl$TcclMBeanServer.invoke(PluggableMBeanServerImpl.java:1493)
    	at org.jboss.as.jmx@20.0.1.Final//org.jboss.as.jmx.PluggableMBeanServerImpl.invoke(PluggableMBeanServerImpl.java:726)
    	at org.jboss.as.jmx@20.0.1.Final//org.jboss.as.jmx.BlockingNotificationMBeanServer.invoke(BlockingNotificationMBeanServer.java:168)
    	at org.jboss.as.jmx@20.0.1.Final//org.jboss.as.jmx.AuthorizingMBeanServer.invoke(AuthorizingMBeanServer.java:258)
    	at org.jboss.remoting-jmx@3.0.4.Final//org.jboss.remotingjmx.protocol.v2.ServerProxy$InvokeHandler.handle(ServerProxy.java:950)
    	at org.jboss.remoting-jmx@3.0.4.Final//org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1$1.run(ServerCommon.java:153)
    	at org.jboss.as.jmx@20.0.1.Final//org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:71)
    	at org.jboss.as.jmx@20.0.1.Final//org.jboss.as.jmx.ServerInterceptorFactory$Interceptor$1.run(ServerInterceptorFactory.java:66)
    	at org.wildfly.security.elytron-base@2.1.0.Final//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:328)
    	at org.wildfly.security.elytron-base@2.1.0.Final//org.wildfly.security.auth.server.SecurityIdentity.runAs(SecurityIdentity.java:285)
    	at org.jboss.as.controller@20.0.1.Final//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:254)
    	at org.jboss.as.controller@20.0.1.Final//org.jboss.as.controller.AccessAuditContext.doAs(AccessAuditContext.java:225)
    	at org.jboss.as.jmx@20.0.1.Final//org.jboss.as.jmx.ServerInterceptorFactory$Interceptor.handleEvent(ServerInterceptorFactory.java:66)
    	at org.jboss.remoting-jmx@3.0.4.Final//org.jboss.remotingjmx.protocol.v2.ServerCommon$MessageReciever$1.run(ServerCommon.java:149)
    	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    	at java.base/java.lang.Thread.run(Thread.java:829)
    Caused by: org.awaitility.core.ConditionTimeoutException: Assertion condition defined as a lambda expression in org.wildfly.test.integration.observability.opentelemetry.exporter.InMemorySpanExporter expected:<6> but was:<5> within 30 seconds.
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:165)
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.AssertionCondition.await(AssertionCondition.java:119)
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.AssertionCondition.await(AssertionCondition.java:31)
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.ConditionFactory.until(ConditionFactory.java:895)
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.ConditionFactory.untilAsserted(ConditionFactory.java:679)
    	at deployment.ContextPropagationTestCase.war//org.wildfly.test.integration.observability.opentelemetry.exporter.InMemorySpanExporter.assertSpanCount(InMemorySpanExporter.java:58)
    	... 151 more
    Caused by: java.lang.AssertionError: expected:<6> but was:<5>
    	at deployment.arquillian-service//org.junit.Assert.fail(Assert.java:89)
    	at deployment.arquillian-service//org.junit.Assert.failNotEquals(Assert.java:835)
    	at deployment.arquillian-service//org.junit.Assert.assertEquals(Assert.java:647)
    	at deployment.arquillian-service//org.junit.Assert.assertEquals(Assert.java:633)
    	at deployment.ContextPropagationTestCase.war//org.wildfly.test.integration.observability.opentelemetry.exporter.InMemorySpanExporter.lambda$assertSpanCount$0(InMemorySpanExporter.java:58)
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.AssertionCondition.lambda$new$0(AssertionCondition.java:53)
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:222)
    	at deployment.ContextPropagationTestCase.war//org.awaitility.core.ConditionAwaiter$ConditionPoller.call(ConditionAwaiter.java:209)
    	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    	... 3 more
    
    [INFO] 
    [INFO] Results:
    [INFO] 
    [ERROR] Failures: 
    [ERROR]   ContextPropagationTestCase.testContextPropagation:69 Failed to get expected spans. Got:
    Recording traceparent
    /ContextPropagationTestCase/contextProp2
    HTTP GET
    Making second request
    /ContextPropagationTestCase/contextProp1
    [INFO] 
    [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
    [INFO] 
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time:  48.553 s
    [INFO] Finished at: 2023-04-25T17:19:58-07:00
    [INFO] ------------------------------------------------------------------------
    

    It appears the first HTTP GET is missing.

            jperkins-rhn James Perkins
            jperkins-rhn James Perkins
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: