You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2021/03/29 10:10:05 UTC

[camel-quarkus-examples] branch master updated: Improve description of health check output in observability example

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

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


The following commit(s) were added to refs/heads/master by this push:
     new a7a3bcd  Improve description of health check output in observability example
a7a3bcd is described below

commit a7a3bcd56d07e1e906559aec05ffcf95c14752a6
Author: James Netherton <ja...@gmail.com>
AuthorDate: Mon Mar 29 11:09:41 2021 +0100

    Improve description of health check output in observability example
---
 health/src/main/resources/application.properties                       | 2 +-
 observability/README.adoc                                              | 2 +-
 .../src/test/java/org/acme/observability/ObservabilityTest.java        | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/health/src/main/resources/application.properties b/health/src/main/resources/application.properties
index ef684fe..0e06a96 100644
--- a/health/src/main/resources/application.properties
+++ b/health/src/main/resources/application.properties
@@ -55,7 +55,7 @@ camel.health.registry-enabled = true
 # you can turn on or off individual routes as shown below
 #camel.health.config[timer].parent = routes
 #camel.health.config[timer].enabled = true
-#camel.health.config[netty].check = routes
+#camel.health.config[netty].parent = routes
 #camel.health.config[netty].enabled = false
 
 # and configure each individually
diff --git a/observability/README.adoc b/observability/README.adoc
index 759bf4a..f268d99 100644
--- a/observability/README.adoc
+++ b/observability/README.adoc
@@ -53,7 +53,7 @@ $ curl -s localhost:8080/health/live
 $ curl -s localhost:8080/health/ready
 ----
 
-The JSON output will contain a check named 'camel' for verifying whether the `CamelContext` is in the 'Started' state and another check to verify whether each individual route is in the 'Started' state.
+The JSON output will contain a checks for verifying whether the `CamelContext` and each individual route is in the 'Started' state.
 
 This example project contains a custom liveness check class `CustomLivenessCheck` and custom readiness check class `CustomReadinessCheck` which leverage the Camel health API.
 You'll see these listed in the health JSON as 'custom-liveness-check' and 'custom-readiness-check'. On every 5th invocation of these checks, the health status of `custom-liveness-check` will be reported as DOWN.
diff --git a/observability/src/test/java/org/acme/observability/ObservabilityTest.java b/observability/src/test/java/org/acme/observability/ObservabilityTest.java
index d9a4d3c..c146afc 100644
--- a/observability/src/test/java/org/acme/observability/ObservabilityTest.java
+++ b/observability/src/test/java/org/acme/observability/ObservabilityTest.java
@@ -22,6 +22,7 @@ import org.hamcrest.Matchers;
 import org.junit.jupiter.api.Test;
 
 import static io.restassured.RestAssured.given;
+import static org.hamcrest.CoreMatchers.hasItems;
 import static org.hamcrest.CoreMatchers.is;
 import static org.hamcrest.Matchers.containsInAnyOrder;
 
@@ -60,7 +61,7 @@ public class ObservabilityTest {
                 .statusCode(200)
                 .body("status", Matchers.is("UP"),
                         "checks.name",
-                        containsInAnyOrder("camel-readiness-checks", "camel-context-check", "Uptime readiness check"),
+                        hasItems("camel-readiness-checks", "Uptime readiness check"),
                         "checks.data.custom-readiness-check", containsInAnyOrder(null, "UP"));
     }
 }