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

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

commit f215446b444c2b409e81537f5f59569c219b972f
Author: James Netherton <jamesnether...@gmail.com>
AuthorDate: Tue Jun 3 12:55:20 2025 +0100

    Add test coverage for platform-http requestTimeout option
---
 .../component/platform/http/it/PlatformHttpRouteBuilder.java   |  4 ++++
 .../quarkus/component/http/server/it/PlatformHttpTest.java     | 10 ++++++++++
 2 files changed, 14 insertions(+)

diff --git 
a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
 
b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
index e542096387..9580fa6b03 100644
--- 
a/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
+++ 
b/integration-tests/platform-http/src/main/java/org/apache/camel/quarkus/component/platform/http/it/PlatformHttpRouteBuilder.java
@@ -183,5 +183,9 @@ public class PlatformHttpRouteBuilder extends RouteBuilder {
                     Principal principal = securityIdentity.getPrincipal();
                     message.setBody(principal.getName() + ":" + 
securityIdentity.getRoles().iterator().next());
                 });
+
+        from("platform-http:/platform-http/timeout?requestTimeout=500")
+                .delay(1000)
+                .setBody().constant("Client won't see this due to request 
timeout");
     }
 }
diff --git 
a/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
 
b/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
index a99aef7f6a..9e0d25dc5d 100644
--- 
a/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
+++ 
b/integration-tests/platform-http/src/test/java/org/apache/camel/quarkus/component/http/server/it/PlatformHttpTest.java
@@ -36,6 +36,7 @@ import org.junit.jupiter.params.provider.MethodSource;
 
 import static org.hamcrest.CoreMatchers.equalTo;
 import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.Matchers.emptyOrNullString;
 import static org.hamcrest.Matchers.notNullValue;
 
 @TestCertificates(certificates = {
@@ -398,6 +399,15 @@ class PlatformHttpTest {
                 .body(equalTo("Header was not present"));
     }
 
+    @Test
+    public void requestTimeout() {
+        RestAssured.given()
+                .get("/platform-http/timeout")
+                .then()
+                .statusCode(503)
+                .body(emptyOrNullString());
+    }
+
     private static Method[] httpMethods() {
         return Method.values();
     }

Reply via email to