You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/10/20 10:34:44 UTC

[GitHub] [camel] jamesnetherton commented on a diff in pull request #8593: CAMEL-18617: Some health checks are hidden when running withg supervised controller enabled

jamesnetherton commented on code in PR #8593:
URL: https://github.com/apache/camel/pull/8593#discussion_r1000455117


##########
components/camel-microprofile/camel-microprofile-health/src/test/java/org/apache/camel/microprofile/health/CamelMicroProfileHealthSupervisedRoutesMainTest.java:
##########
@@ -16,55 +16,74 @@
  */
 package org.apache.camel.microprofile.health;
 
+import java.util.Map;
 import java.util.Optional;
 
 import javax.json.JsonArray;
 import javax.json.JsonObject;
 import javax.json.JsonValue;
 
-import io.smallrye.health.SmallRyeHealth;
-import io.smallrye.health.SmallRyeHealthReporter;
 import org.apache.camel.CamelContext;
+import org.apache.camel.Component;
+import org.apache.camel.Consumer;
+import org.apache.camel.Endpoint;
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.Producer;
 import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.health.HealthCheckHelper;
 import org.apache.camel.health.HealthCheckRegistry;
+import org.apache.camel.health.HealthCheckResultBuilder;
 import org.apache.camel.impl.DefaultCamelContext;
+import org.apache.camel.impl.health.AbstractHealthCheck;
+import org.apache.camel.impl.health.ComponentsHealthCheckRepository;
 import org.apache.camel.main.SimpleMain;
+import org.apache.camel.support.DefaultComponent;
+import org.apache.camel.support.DefaultConsumer;
+import org.apache.camel.support.DefaultEndpoint;
+import org.apache.camel.support.DefaultProducer;
 import org.eclipse.microprofile.health.HealthCheckResponse.Status;
 import org.junit.jupiter.api.Test;
 
+import io.smallrye.health.SmallRyeHealth;
+import io.smallrye.health.SmallRyeHealthReporter;
+
 import static org.apache.camel.microprofile.health.CamelMicroProfileHealthTestHelper.getHealthJson;
 import static org.junit.jupiter.api.Assertions.assertEquals;
 import static org.junit.jupiter.api.Assertions.fail;
 
 public class CamelMicroProfileHealthSupervisedRoutesMainTest {
-    private SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
+    private final SmallRyeHealthReporter reporter = new SmallRyeHealthReporter();
 
     @Test
     public void testSupervisedRouteHealthChecks() throws Exception {

Review Comment:
   It's probably ok. Would be nice to cover the non-supervised scenario if possible. I'll leave it up to you whether you want to do that.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org