From c3d0b33c9facf49e37e9ab58412227ff44c66363 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 23 Aug 2021 15:16:13 -0400 Subject: Fix junits broken by change in is-alive type Issue-ID: POLICY-3531 Change-Id: I1460333fdd2ebeb96aaa3b5d3186d2bd1eda2d71 Signed-off-by: Jim Hahn --- .../policy/apex/services/onappf/rest/CommonApexStarterRestServer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'services/services-onappf/src') diff --git a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java index 65d901d41..7313f9168 100644 --- a/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java +++ b/services/services-onappf/src/test/java/org/onap/policy/apex/services/onappf/rest/CommonApexStarterRestServer.java @@ -28,6 +28,7 @@ import java.io.File; import java.security.SecureRandom; import java.util.Map; import java.util.Properties; +import java.util.concurrent.atomic.AtomicBoolean; import java.util.function.Function; import javax.net.ssl.SSLContext; import javax.ws.rs.client.Client; @@ -209,7 +210,8 @@ public class CommonApexStarterRestServer { private void markActivator(final boolean wasAlive) { final Object manager = Whitebox.getInternalState( Registry.get(ApexStarterConstants.REG_APEX_STARTER_ACTIVATOR, ApexStarterActivator.class), "manager"); - Whitebox.setInternalState(manager, "running", wasAlive); + AtomicBoolean running = Whitebox.getInternalState(manager, "running"); + running.set(wasAlive); } /** -- cgit 1.2.3-korg