diff options
2 files changed, 4 insertions, 1 deletions
diff --git a/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java b/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java index 792c4726..d4b7fb79 100644 --- a/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java +++ b/main/src/main/java/org/onap/policy/distribution/main/startstop/DistributionActivator.java @@ -114,7 +114,7 @@ public class DistributionActivator { } receptionHandlersMap.clear(); deregisterToParameterService(distributionParameterGroup); - DistributionActivator.setAlive(true); + DistributionActivator.setAlive(false); // Stop the distribution rest server restServer.stop(); diff --git a/main/src/test/java/org/onap/policy/distribution/main/startstop/TestDistributionActivator.java b/main/src/test/java/org/onap/policy/distribution/main/startstop/TestDistributionActivator.java index 47ac82b1..d877e2a7 100644 --- a/main/src/test/java/org/onap/policy/distribution/main/startstop/TestDistributionActivator.java +++ b/main/src/test/java/org/onap/policy/distribution/main/startstop/TestDistributionActivator.java @@ -21,6 +21,7 @@ package org.onap.policy.distribution.main.startstop; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; import static org.junit.Assert.assertTrue; import org.junit.Test; @@ -49,6 +50,7 @@ public class TestDistributionActivator { final DistributionActivator activator = new DistributionActivator(parGroup); activator.initialize(); assertTrue(activator.getParameterGroup().isValid()); + assertTrue(DistributionActivator.isAlive()); assertEquals(CommonTestData.DISTRIBUTION_GROUP_NAME, activator.getParameterGroup().getName()); assertEquals(CommonTestData.RECEPTION_HANDLER_TYPE, activator.getParameterGroup().getReceptionHandlerParameters() @@ -65,5 +67,6 @@ public class TestDistributionActivator { activator.getParameterGroup().getPolicyForwarderConfigurationParameters() .get(CommonTestData.FORWARDER_CONFIGURATION_PARAMETERS).getClass()); activator.terminate(); + assertFalse(DistributionActivator.isAlive()); } } |