diff --git a/pom.xml b/pom.xml
index ef09598..f36ac98 100644
--- a/pom.xml
+++ b/pom.xml
@@ -233,16 +233,6 @@
-
- org.apache.maven.plugins
- maven-surefire-plugin
-
-
-
- false
-
-
diff --git a/src/main/java/org/gcube/smartgears/health/HealthTask.java b/src/main/java/org/gcube/smartgears/health/HealthTask.java
index ef755d6..8b7100f 100644
--- a/src/main/java/org/gcube/smartgears/health/HealthTask.java
+++ b/src/main/java/org/gcube/smartgears/health/HealthTask.java
@@ -42,7 +42,7 @@ public class HealthTask extends TimerTask{
try {
return check.check();
}catch (Throwable t) {
- return HealthCheckResponse.builder(check.getName()).down().withMessage(t.getMessage()).build();
+ return HealthCheckResponse.builder(check.getName()).down().error(t.getMessage()).build();
}
}
diff --git a/src/main/java/org/gcube/smartgears/health/KeyCloakHealthCheck.java b/src/main/java/org/gcube/smartgears/health/KeyCloakHealthCheck.java
index fd087bf..d685a77 100644
--- a/src/main/java/org/gcube/smartgears/health/KeyCloakHealthCheck.java
+++ b/src/main/java/org/gcube/smartgears/health/KeyCloakHealthCheck.java
@@ -21,10 +21,10 @@ public class KeyCloakHealthCheck implements HealthCheck{
try {
Set contexts = ProviderFactory.provider().containerContext().authorizationProvider().getContexts();
if (contexts.isEmpty())
- return HealthCheckResponse.builder(CHECK_NAME).down().withMessage("no contexts are defined for the client id provided").build();
- return HealthCheckResponse.builder(CHECK_NAME).up().build();
+ return HealthCheckResponse.builder(CHECK_NAME).down().error("no contexts are defined for the client id provided").build();
+ return HealthCheckResponse.builder(CHECK_NAME).up().info(String.format("running contexts are %s", contexts)).build();
}catch (Exception e) {
- return HealthCheckResponse.builder(CHECK_NAME).down().withMessage(e.getMessage()).build();
+ return HealthCheckResponse.builder(CHECK_NAME).down().error(e.getMessage()).build();
}
}