From 222249acfc5a8c89ca172ba781fe236466d546b9 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 23 Aug 2021 14:44:54 -0400 Subject: Fix junits broken by change in is-alive type Issue-ID: POLICY-3531 Change-Id: I5eadaa6dbb0c66940a5af0c552894a3d874d51a1 Signed-off-by: Jim Hahn --- main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java b/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java index a46ee503..938fe581 100644 --- a/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java +++ b/main/src/test/java/org/onap/policy/pdpx/main/CommonRest.java @@ -29,6 +29,7 @@ import java.nio.charset.StandardCharsets; import java.nio.file.Files; import java.nio.file.Path; import java.security.SecureRandom; +import java.util.concurrent.atomic.AtomicBoolean; import javax.net.ssl.SSLContext; import javax.ws.rs.client.Client; import javax.ws.rs.client.ClientBuilder; @@ -215,6 +216,7 @@ public class CommonRest { */ private void markActivator(boolean newAlive) { Object manager = Whitebox.getInternalState(XacmlPdpActivator.getCurrent(), "serviceManager"); - Whitebox.setInternalState(manager, "running", newAlive); + AtomicBoolean running = Whitebox.getInternalState(manager, "running"); + running.set(newAlive); } } -- cgit 1.2.3-korg