From 31eb74abe8ec22d1b4821322fbb6d841f09a94bd Mon Sep 17 00:00:00 2001 From: Paul Latzelsperger Date: Mon, 3 Jun 2024 07:22:05 +0200 Subject: [PATCH] fix: correctly set HealthStatus of BaseRuntime --- .../org/eclipse/edc/boot/system/runtime/BaseRuntime.java | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java b/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java index f7cd633ccc5..32b76bf3c36 100644 --- a/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java +++ b/core/common/boot/src/main/java/org/eclipse/edc/boot/system/runtime/BaseRuntime.java @@ -184,12 +184,9 @@ private void boot(boolean addShutdownHook) { } if (context.hasService(HealthCheckService.class)) { - var statusbuilder = HealthCheckResult.Builder.newInstance().component("BaseRuntime"); - var startupStatus = new AtomicReference<>(statusbuilder.failure("Startup not complete").build()); + var startupStatusRef = new AtomicReference<>(HealthCheckResult.Builder.newInstance().component("BaseRuntime").success().build()); var healthCheckService = context.getService(HealthCheckService.class); - healthCheckService.addStartupStatusProvider(startupStatus::get); - - startupStatus.set(statusbuilder.success().build()); + healthCheckService.addStartupStatusProvider(startupStatusRef::get); } } catch (Exception e) {