Fix junits broken by change in is-alive type 71/123471/1
authorJim Hahn <jrh3@att.com>
Mon, 23 Aug 2021 19:02:51 +0000 (15:02 -0400)
committerJim Hahn <jrh3@att.com>
Mon, 23 Aug 2021 19:03:01 +0000 (15:03 -0400)
Issue-ID: POLICY-3531
Change-Id: I1e66779f4ac05862649828e79914e902a99400d3
Signed-off-by: Jim Hahn <jrh3@att.com>
main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java

index c0a6951..e1d1e14 100644 (file)
@@ -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);
     }
 
     /**