This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new bd55c5d4f237 CAMEL-27279: Fix flaky JettyAsyncContinuationTimeoutTest 
(#30498)
bd55c5d4f237 is described below

commit bd55c5d4f2379cd25192d15a7a059e2291332131
Author: AurĂ©lien Pupier <[email protected]>
AuthorDate: Fri Nov 20 22:15:08 2026 +0100

    CAMEL-27279: Fix flaky JettyAsyncContinuationTimeoutTest (#30498)
    
    Remove the flaky wall-clock check (taken < 4500).
    Under CI load and thread contention, client-measured elapsed time can
    exceed 4500ms even though the continuation timeout (3000ms) triggered as
    expected before the backend route finished processing (6000ms).
    Receiving HTTP 504 Gateway Timeout confirms the continuation timeout fired
    before the backend replied (which would have returned HTTP 200 OK), and
    MockEndpoint.assertIsSatisfied(context) confirms the backend task still
    finishes asynchronously.
    
    Co-authored-by: IBM Bob 2.2.1
    Signed-off-by: AurĂ©lien Pupier <[email protected]>
---
 .../component/jetty/async/JettyAsyncContinuationTimeoutTest.java  | 8 --------
 1 file changed, 8 deletions(-)

diff --git 
a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/async/JettyAsyncContinuationTimeoutTest.java
 
b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/async/JettyAsyncContinuationTimeoutTest.java
index 925db78287e1..d3657c9e2bc7 100644
--- 
a/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/async/JettyAsyncContinuationTimeoutTest.java
+++ 
b/components/camel-jetty/src/test/java/org/apache/camel/component/jetty/async/JettyAsyncContinuationTimeoutTest.java
@@ -21,7 +21,6 @@ import org.apache.camel.builder.RouteBuilder;
 import org.apache.camel.component.jetty.BaseJettyTest;
 import org.apache.camel.component.mock.MockEndpoint;
 import org.apache.camel.http.base.HttpOperationFailedException;
-import org.apache.camel.util.StopWatch;
 import org.junit.jupiter.api.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
@@ -29,7 +28,6 @@ import org.slf4j.LoggerFactory;
 import static org.apache.camel.test.junit6.TestSupport.assertIsInstanceOf;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.assertThrows;
-import static org.junit.jupiter.api.Assertions.assertTrue;
 
 public class JettyAsyncContinuationTimeoutTest extends BaseJettyTest {
 
@@ -39,21 +37,15 @@ public class JettyAsyncContinuationTimeoutTest extends 
BaseJettyTest {
     public void testJettyAsyncTimeout() throws Exception {
         getMockEndpoint("mock:result").expectedBodiesReceived("Bye World");
 
-        StopWatch watch = new StopWatch();
         CamelExecutionException e = assertThrows(CamelExecutionException.class,
                 () -> 
template.requestBody("http://localhost:{{port}}/myservice";, null, String.class),
                 "Should have thrown an exception");
 
         LOG.info("Timeout hit and client got reply with failure status code");
 
-        long taken = watch.taken();
-
         HttpOperationFailedException cause = 
assertIsInstanceOf(HttpOperationFailedException.class, e.getCause());
         assertEquals(504, cause.getStatusCode());
 
-        // should be approx 3-4 sec.
-        assertTrue(taken < 4500, "Timeout should occur faster than " + taken);
-
         MockEndpoint.assertIsSatisfied(context);
     }
 

Reply via email to