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 a907ceb4bb0 CAMEL-19377: camel-platform-http-vertx - Add test for suspended consumer a907ceb4bb0 is described below commit a907ceb4bb0679dc9fe15827bd4596d7eb38b746 Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Tue May 23 07:06:49 2023 +0200 CAMEL-19377: camel-platform-http-vertx - Add test for suspended consumer --- .../http/vertx/VertxPlatformHttpEngineTest.java | 36 ++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java index 8b4291e3a17..23c45b5f94f 100644 --- a/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java +++ b/components/camel-platform-http-vertx/src/test/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpEngineTest.java @@ -714,6 +714,42 @@ public class VertxPlatformHttpEngineTest { } } + @Test + public void testConsumerSuspended() throws Exception { + final CamelContext context = createCamelContext(); + + try { + context.addRoutes(new RouteBuilder() { + @Override + public void configure() { + from("platform-http:/get") + .routeId("get") + .setBody().constant("get"); + } + }); + + context.start(); + + given() + .when() + .get("/get") + .then() + .statusCode(200) + .body(equalTo("get")); + + context.getRouteController().suspendRoute("get"); + + given() + .when() + .get("/get") + .then() + .statusCode(404); + + } finally { + context.stop(); + } + } + static CamelContext createCamelContext() throws Exception { return createCamelContext(null); }