summaryrefslogtreecommitdiffstats
path: root/feature-active-standby-management/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'feature-active-standby-management/src/test')
-rw-r--r--feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java8
-rw-r--r--feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java26
2 files changed, 17 insertions, 17 deletions
diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java
index 55ab7c55..719fb62f 100644
--- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java
+++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/AllSeemsWellTest.java
@@ -278,8 +278,8 @@ public class AllSeemsWellTest {
logger.debug("testAllSeemsWell: Sleeping {} s, to allow JpaDroolsPdpsConnector "
- + "time to check droolspdpentity table", SLEEP_TIME_SEC);
- waitForCondition(()-> conn.getPdp(thisPdpId).isDesignated(), SLEEP_TIME_SEC);
+ + "time to check droolspdpentity table", SLEEP_TIME_SEC);
+ waitForCondition(() -> conn.getPdp(thisPdpId).isDesignated(), SLEEP_TIME_SEC);
// Verify that this formerly un-designated PDP in HOT_STANDBY is now designated and providing service.
@@ -305,8 +305,8 @@ public class AllSeemsWellTest {
//It takes 10x the update interval (1 sec) before the watcher will declare the election handler dead
//and that just stops forward progress counter. So, the fp monitor must then run to determine
- //if the fpc has stalled. That will take about another 5 sec.
- waitForCondition(()-> smf.getStandbyStatus().equals(StateManagement.COLD_STANDBY),
+ // if the fpc has stalled. That will take about another 5 sec.
+ waitForCondition(() -> smf.getStandbyStatus().equals(StateManagement.COLD_STANDBY),
STALLED_ELECTION_HANDLER_SLEEP_TIME_SEC);
logger.debug("testAllSeemsWell: After isStalled=true, PDP= {} "
diff --git a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java
index b07ab76c..b277850c 100644
--- a/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java
+++ b/feature-active-standby-management/src/test/java/org/onap/policy/drools/controller/test/StandbyStateManagementTest.java
@@ -51,7 +51,7 @@ import org.onap.policy.drools.activestandby.DroolsPdpImpl;
import org.onap.policy.drools.activestandby.DroolsPdpsConnector;
import org.onap.policy.drools.activestandby.DroolsPdpsElectionHandler;
import org.onap.policy.drools.activestandby.JpaDroolsPdpsConnector;
-import org.onap.policy.drools.activestandby.PMStandbyStateChangeNotifier;
+import org.onap.policy.drools.activestandby.PmStandbyStateChangeNotifier;
import org.onap.policy.drools.core.PolicySessionFeatureApi;
import org.onap.policy.drools.statemanagement.StateManagementFeatureApi;
import org.slf4j.Logger;
@@ -233,10 +233,10 @@ public class StandbyStateManagementTest {
//@Ignore
//@Test
public void testPmStandbyStateChangeNotifier() throws Exception {
- logger.debug("\n\ntestPMStandbyStateChangeNotifier: Entering\n\n");
+ logger.debug("\n\ntestPmStandbyStateChangeNotifier: Entering\n\n");
cleanXacmlDb();
- logger.debug("testPMStandbyStateChangeNotifier: Reading activeStandbyProperties");
+ logger.debug("testPmStandbyStateChangeNotifier: Reading activeStandbyProperties");
Properties activeStandbyProperties = new Properties();
activeStandbyProperties.load(new FileInputStream(new File(
@@ -246,14 +246,14 @@ public class StandbyStateManagementTest {
activeStandbyProperties.setProperty("resource.name", resourceName);
ActiveStandbyProperties.initProperties(activeStandbyProperties);
- logger.debug("testPMStandbyStateChangeNotifier: Getting StateManagement instance");
+ logger.debug("testPmStandbyStateChangeNotifier: Getting StateManagement instance");
StateManagement sm = new StateManagement(emfx, resourceName);
//Create an instance of the Observer
- PMStandbyStateChangeNotifier pmNotifier = new PMStandbyStateChangeNotifier();
+ PmStandbyStateChangeNotifier pmNotifier = new PmStandbyStateChangeNotifier();
- //Register the PMStandbyStateChangeNotifier Observer
+ //Register the PmStandbyStateChangeNotifier Observer
sm.addObserver(pmNotifier);
//At this point the standbystatus = 'null'
@@ -267,23 +267,23 @@ public class StandbyStateManagementTest {
sm.demote();
System.out.println(pmNotifier.getPreviousStandbyStatus());
assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PMStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
//Now making standbystatus=coldstandby
sm.lock();
assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PMStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
//standbystatus = hotstandby
sm.unlock();
assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PMStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
//standbystatus = providingservice
sm.promote();
//The previousStandbyStatus is not updated until after the delay activation expires
assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PMStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
//Sleep long enough for the delayActivationTimer to run
sleep(5000);
@@ -296,17 +296,17 @@ public class StandbyStateManagementTest {
//standbystatus = coldstandby
sm.lock();
assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PMStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
//standbystatus = hotstandby
sm.unlock();
assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PMStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
//standbystatus = hotstandby
sm.demote();
assertTrue(pmNotifier.getPreviousStandbyStatus().equals(
- PMStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
+ PmStandbyStateChangeNotifier.HOTSTANDBY_OR_COLDSTANDBY));
}
/**