From: Jim Hahn Date: Mon, 23 Aug 2021 19:02:51 +0000 (-0400) Subject: Fix junits broken by change in is-alive type X-Git-Tag: 2.5.0~8 X-Git-Url: https://gerrit.onap.org/r/gitweb?a=commitdiff_plain;h=861dbc22855e93784eb2145daea7be9f189ad765;p=policy%2Fpap.git Fix junits broken by change in is-alive type Issue-ID: POLICY-3531 Change-Id: I1e66779f4ac05862649828e79914e902a99400d3 Signed-off-by: Jim Hahn --- 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); } /**