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 cff08ad17ac Fixed jbang test
cff08ad17ac is described below
commit cff08ad17ac101bd18432ba8a84f03990b693011
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Aug 5 20:11:04 2025 +0200
Fixed jbang test
---
.../apache/camel/dsl/jbang/it/DevModeITCase.java | 22 ++++++++++++++++++++--
1 file changed, 20 insertions(+), 2 deletions(-)
diff --git
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
index 5c732a34a34..c530e381ca2 100644
---
a/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
+++
b/dsl/camel-jbang/camel-jbang-it/src/test/java/org/apache/camel/dsl/jbang/it/DevModeITCase.java
@@ -58,9 +58,9 @@ public class DevModeITCase extends JBangTestSupport {
checkLogContains(DEFAULT_MSG);
final HttpResponse<String> res = getDevRequest("");
Assertions.assertThat(res.statusCode()).as("dev console status
code").isEqualTo(200);
- final HttpResponse<String> health = getDevRequest("/health");
+ final HttpResponse<String> health = getObserve("/health");
Assertions.assertThat(health.statusCode()).as("dev console health
status code").isEqualTo(200);
- Assertions.assertThat(health.body()).as("health status is
UP").contains("Health Check Status: UP");
+ Assertions.assertThat(health.body()).as("health status is
UP").contains("UP");
final HttpResponse<String> top = getDevRequest("/top");
Assertions.assertThat(top.statusCode()).as("dev console top status
code").isEqualTo(200);
Assertions.assertThat(top.body()).as("top contains
route").contains("Route Id: route1");
@@ -132,4 +132,22 @@ public class DevModeITCase extends JBangTestSupport {
throw new RuntimeException(e);
}
}
+
+ private HttpResponse<String> getObserve(final String ctxUrl) {
+ try {
+ return httpClient.send(HttpRequest
+ .newBuilder(
+ new URI(
+
String.format("http://localhost:%s/observe%s",
containerService.getDevConsolePort(),
+ ctxUrl)))
+ .timeout(Duration.ofSeconds(5))
+ .GET()
+ .build(),
+ HttpResponse.BodyHandlers.ofString());
+ } catch (IOException | InterruptedException | URISyntaxException e) {
+ Assertions.fail("unable to call observe");
+ throw new RuntimeException(e);
+ }
+ }
+
}