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

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

commit d29788f85168587d7a66de5981d3bc1b81ec6834
Author: James Netherton <[email protected]>
AuthorDate: Mon Sep 22 08:20:11 2025 +0100

    Use observability-services extension in Health example project
---
 health/pom.xml                                       |  2 +-
 health/src/main/resources/application.properties     |  4 ----
 health/src/test/java/org/acme/health/HealthIT.java   |  5 +++++
 health/src/test/java/org/acme/health/HealthTest.java | 10 ++++++++--
 4 files changed, 14 insertions(+), 7 deletions(-)

diff --git a/health/pom.xml b/health/pom.xml
index d00f110..76c2dd5 100644
--- a/health/pom.xml
+++ b/health/pom.xml
@@ -83,7 +83,7 @@
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
-            <artifactId>camel-quarkus-microprofile-health</artifactId>
+            <artifactId>camel-quarkus-observability-services</artifactId>
         </dependency>
         <dependency>
             <groupId>org.apache.camel.quarkus</groupId>
diff --git a/health/src/main/resources/application.properties 
b/health/src/main/resources/application.properties
index b317b68..a97f65b 100644
--- a/health/src/main/resources/application.properties
+++ b/health/src/main/resources/application.properties
@@ -23,10 +23,6 @@ quarkus.banner.enabled = false
 # here you can configure options on camel quarkus
 camel.quakus.name = MyHealthyCamel
 
-# extended runtime statistics about bean introspection usage (java reflection)
-camel.main.bean-introspection-extended-statistics=true
-camel.main.bean-introspection-logging-level=INFO
-
 # enable supervised route controller which will startup routes in safe manner
 camel.routeController.enabled = true
 # attempt up till 10 times to start a route (and exhaust if still failing)
diff --git a/health/src/test/java/org/acme/health/HealthIT.java 
b/health/src/test/java/org/acme/health/HealthIT.java
index 99e696c..f010501 100644
--- a/health/src/test/java/org/acme/health/HealthIT.java
+++ b/health/src/test/java/org/acme/health/HealthIT.java
@@ -17,7 +17,12 @@
 package org.acme.health;
 
 import io.quarkus.test.junit.QuarkusIntegrationTest;
+import org.eclipse.microprofile.config.ConfigProvider;
 
 @QuarkusIntegrationTest
 class HealthIT extends HealthTest {
+    @Override
+    protected Integer getManagementPort() {
+        return ConfigProvider.getConfig().getValue("quarkus.management.port", 
Integer.class);
+    }
 }
diff --git a/health/src/test/java/org/acme/health/HealthTest.java 
b/health/src/test/java/org/acme/health/HealthTest.java
index fc4bf27..2f76d03 100644
--- a/health/src/test/java/org/acme/health/HealthTest.java
+++ b/health/src/test/java/org/acme/health/HealthTest.java
@@ -18,6 +18,7 @@ package org.acme.health;
 
 import io.quarkus.test.junit.QuarkusTest;
 import io.restassured.RestAssured;
+import org.eclipse.microprofile.config.ConfigProvider;
 import org.hamcrest.Matchers;
 import org.junit.jupiter.api.Test;
 
@@ -27,8 +28,9 @@ import static org.hamcrest.CoreMatchers.is;
 public class HealthTest {
 
     @Test
-    public void testHealth() throws InterruptedException {
-        RestAssured.get("/q/health")
+    public void testHealth() {
+        RestAssured.port = getManagementPort();
+        RestAssured.get("/observe/health")
                 .then()
                 .statusCode(503)
                 .body("status", is("DOWN"),
@@ -37,4 +39,8 @@ public class HealthTest {
                         "checks.findAll { it.name == 'camel-routes' }.status", 
Matchers.contains("DOWN"),
                         "checks.findAll { it.name == 'camel-consumers' 
}.status", Matchers.contains("DOWN"));
     }
+
+    protected Integer getManagementPort() {
+        return 
ConfigProvider.getConfig().getValue("quarkus.management.test-port", 
Integer.class);
+    }
 }

Reply via email to