Skip to content

[Bug]: org.a2aproject.sdk.tests.multiversion.jsonrpc.MultiVersionJSONRPCTest.testRequestScopedBeanAvailableOnAgentExecutorThreadStreaming #949

Description

@ehsavoie

What happened?

I can see some tests failing intermittently

Relevant log output

org.a2aproject.sdk.tests.multiversion.jsonrpc.MultiVersionJSONRPCTest.testRequestScopedBeanAvailableOnAgentExecutorThreadStreaming -- Time elapsed: 0.025 s <<< FAILURE!                                                                                       
  org.opentest4j.AssertionFailedError:                                                                                                                                                                                                                                                      
  Should not have received an error ==> expected: <null> but was: <org.a2aproject.sdk.spec.InternalError: Agent execution failed: RequestScoped context was not active when trying to obtain a bean instance for a client proxy of CLASS bean                                               
  [class=org.a2aproject.sdk.server.apps.common.RequestScopedBean, id=wg_3BE8Ak7YyWdSHotvzkfmUXLk]                                                                                                                                                                                           
      - you can activate the request context for a specific method using the @ActivateRequestContext interceptor binding>                                                                                                                                                                   
      at org.a2aproject.sdk.server.apps.common.AbstractA2AServerTest.testRequestScopedBeanAvailableOnAgentExecutorThreadStreaming(AbstractA2AServerTest.java:582)                                                                                                                           
      at java.base/java.lang.reflect.Method.invoke(Method.java:580)                                                                                                                                                                                                                         
      at io.quarkus.test.junit.QuarkusTestExtension.runExtensionMethod(QuarkusTestExtension.java:1005)                                                                                                                                                                                      
      at io.quarkus.test.junit.QuarkusTestExtension.interceptTestMethod(QuarkusTestExtension.java:852)                                                                                                                                                                                      
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)                                                                                                                                                                                                                         
      at java.base/java.util.ArrayList.forEach(ArrayList.java:1596)                                                                                                                                                                                                                         
      Suppressed: jakarta.enterprise.context.ContextNotActiveException: RequestScoped context was not active when trying to obtain a bean instance for a client proxy of CLASS bean [class=org.a2aproject.sdk.server.apps.common.RequestScopedBean, id=wg_3BE8Ak7YyWdSHotvzkfmUXLk]         
      - you can activate the request context for a specific method using the @ActivateRequestContext interceptor binding                                                                                                                                                                    
          at io.quarkus.arc.impl.ClientProxies.notActive(ClientProxies.java:76)                                                                                                                                                                                                             
          at io.quarkus.arc.impl.ClientProxies.getSingleContextDelegate(ClientProxies.java:32)                                                                                                                                                                                              
          at org.a2aproject.sdk.server.apps.common.RequestScopedBean_ClientProxy.arc$delegate(Unknown Source)                                                                                                                                                                               
          at org.a2aproject.sdk.server.apps.common.RequestScopedBean_ClientProxy.getValue(Unknown Source)                                                                                                                                                                                   
          at org.a2aproject.sdk.server.apps.common.AgentExecutorProducer$1.execute(AgentExecutorProducer.java:65)                                                                                                                                                                           
          at org.a2aproject.sdk.server.requesthandlers.DefaultRequestHandler$2.run(DefaultRequestHandler.java:935)                                                                                                                                                                          
          at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)                                                                                                                                                                                     
          at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)                                                                                                                                                                                   
          at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:695)                                                                                                                                                                                         
          at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)                                                                                                                                                                                        
          at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)                                                                                                                                                                                              
          at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1622)                                                                                                                                                                                         
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1589)                                                                                                                                                                                        
          at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)                                                                                                                                                                                                           
          at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)                                                                                                                                                                                       
          at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)                                                                                                                                                                                          
          at java.base/java.lang.Thread.run(Thread.java:1583)                                                                                                                                                                                                                               
      Suppressed: org.a2aproject.sdk.spec.InternalError: Agent execution failed: RequestScoped context was not active when trying to obtain a bean instance for a client proxy of CLASS bean [class=org.a2aproject.sdk.server.apps.common.RequestScopedBean,                                
  id=wg_3BE8Ak7YyWdSHotvzkfmUXLk]                                                                                                                                                                                                                                                           
      - you can activate the request context for a specific method using the @ActivateRequestContext interceptor binding                                                                                                                                                                    
          at org.a2aproject.sdk.server.requesthandlers.DefaultRequestHandler$2.run(DefaultRequestHandler.java:946)                                                                                                                                                                          
          at java.base/java.util.concurrent.CompletableFuture$AsyncRun.run(CompletableFuture.java:1804)                                                                                                                                                                                     
          at io.smallrye.context.impl.wrappers.SlowContextualRunnable.run(SlowContextualRunnable.java:19)                                                                                                                                                                                   
          at io.quarkus.vertx.core.runtime.VertxCoreRecorder$15.runWith(VertxCoreRecorder.java:695)                                                                                                                                                                                         
          at org.jboss.threads.EnhancedQueueExecutor$Task.doRunWith(EnhancedQueueExecutor.java:2651)                                                                                                                                                                                        
          at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2630)                                                                                                                                                                                              
          at org.jboss.threads.EnhancedQueueExecutor.runThreadBody(EnhancedQueueExecutor.java:1622)                                                                                                                                                                                         
          at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1589)                                                                                                                                                                                        
          at org.jboss.threads.DelegatingRunnable.run(DelegatingRunnable.java:11)                                                                                                                                                                                                           
          at org.jboss.threads.ThreadLocalResettingRunnable.run(ThreadLocalResettingRunnable.java:11)                                                                                                                                                                                       
          at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)                                                                                                                                                                                          
          at java.base/java.lang.Thread.run(Thread.java:1583)

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions