From 861dbc22855e93784eb2145daea7be9f189ad765 Mon Sep 17 00:00:00 2001 From: Jim Hahn Date: Mon, 23 Aug 2021 15:02:51 -0400 Subject: Fix junits broken by change in is-alive type Issue-ID: POLICY-3531 Change-Id: I1e66779f4ac05862649828e79914e902a99400d3 Signed-off-by: Jim Hahn --- .../test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'main/src/test') diff --git a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java index c0a69515..e1d1e14a 100644 --- a/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java +++ b/main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java @@ -29,6 +29,7 @@ import java.io.FileOutputStream; import java.nio.charset.StandardCharsets; import java.security.SecureRandom; 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; @@ -234,7 +235,8 @@ public class CommonPapRestServer { private void markActivator(boolean wasAlive) { Object manager = Whitebox.getInternalState(Registry.get(PapConstants.REG_PAP_ACTIVATOR, PapActivator.class), "serviceManager"); - Whitebox.setInternalState(manager, "running", wasAlive); + AtomicBoolean running = Whitebox.getInternalState(manager, "running"); + running.set(wasAlive); } /** -- cgit 1.2.3-korg