This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch 3.27.x in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit cb6d2caee9b4711919790ac81297bd4146bc2e1b Author: JiriOndrusek <[email protected]> AuthorDate: Thu Oct 23 09:07:17 2025 +0200 Fixes #7860: more logging and tweaking timouts for jt400 real tests --- .../camel/quarkus/component/jt400/it/Jt400Resource.java | 13 +++++++++++-- .../apache/camel/quarkus/component/jt400/it/Jt400Test.java | 4 ++-- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/Jt400Resource.java b/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/Jt400Resource.java index f83cbd58b7..ae62c33dd1 100644 --- a/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/Jt400Resource.java +++ b/integration-tests/jt400/src/main/java/org/apache/camel/quarkus/component/jt400/it/Jt400Resource.java @@ -37,13 +37,17 @@ import org.apache.camel.CamelContext; import org.apache.camel.ConsumerTemplate; import org.apache.camel.Exchange; import org.apache.camel.ProducerTemplate; +import org.apache.camel.ServiceStatus; import org.apache.camel.component.jt400.Jt400Component; import org.apache.camel.component.jt400.Jt400Endpoint; import org.eclipse.microprofile.config.inject.ConfigProperty; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; @Path("/jt400") @ApplicationScoped public class Jt400Resource { + private static final Logger LOGGER = LoggerFactory.getLogger(Jt400Resource.class); @ConfigProperty(name = "cq.jt400.url") String jt400Url; @@ -165,12 +169,17 @@ public class Jt400Resource { @GET @Produces(MediaType.TEXT_PLAIN) public Response stopRoute(@PathParam("route") String routeName) throws Exception { + LOGGER.info("Stopping route: {}", routeName); + ServiceStatus routeStatus = context.getRouteController().getRouteStatus(routeName); if (context.getRouteController().getRouteStatus(routeName).isStoppable()) { + LOGGER.info("Route {} before stop information: {}", routeName, routeStatus.toString()); context.getRouteController().stopRoute(routeName); + LOGGER.info("Route {} stopped", routeName); } - boolean resp = context.getRouteController().getRouteStatus(routeName).isStopped(); + routeStatus = context.getRouteController().getRouteStatus(routeName); + LOGGER.info("Route {} status: {}", routeName, routeStatus.toString()); - return Response.ok().entity(resp).build(); + return Response.ok().entity(routeStatus.isStopped()).build(); } @Path("/component/stopWrong") diff --git a/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400Test.java b/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400Test.java index 77e7562def..6b202ef32b 100644 --- a/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400Test.java +++ b/integration-tests/jt400/src/test/java/org/apache/camel/quarkus/component/jt400/it/Jt400Test.java @@ -256,7 +256,7 @@ public class Jt400Test { LOGGER.debug("testInquiryMessageQueue: inquiry message processed"); //stop route (and wait for stop) - Awaitility.await().atMost(WAIT_IN_SECONDS, TimeUnit.SECONDS).until( + Awaitility.await().atMost(2 * WAIT_IN_SECONDS, TimeUnit.SECONDS).until( () -> RestAssured.get("/jt400/route/stop/inquiryRoute") .then() .statusCode(200) @@ -265,7 +265,7 @@ public class Jt400Test { LOGGER.debug("testInquiryMessageQueue: inquiry route stooped"); //check written message with client - Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(20, TimeUnit.SECONDS).until( + Awaitility.await().pollInterval(1, TimeUnit.SECONDS).atMost(WAIT_IN_SECONDS, TimeUnit.SECONDS).until( () -> getClientHelper().peekReplyToQueueMessage(replyMsg), Matchers.notNullValue()); LOGGER.debug("testInquiryMessageQueue: reply message confirmed by peek: " + replyMsg);
