summaryrefslogtreecommitdiffstats
path: root/feature-active-standby-management/src/test
diff options
context:
space:
mode:
authorJim Hahn <jrh3@att.com>2019-07-10 17:09:05 -0400
committerJim Hahn <jrh3@att.com>2019-07-18 09:49:09 -0400
commitf56dbc888dd7ef8c1abd31b726525cf57ede8aa7 (patch)
tree6974377380d0a60e7bf98686436e0f7b5fd10b8b /feature-active-standby-management/src/test
parent86512b0d4e3235fca6379b3d7f3f1d8a9a5c606b (diff)
Fix checkstyle issues in feature-active-standby-management
Also deleted the checkstyle suppression file. Change-Id: I4a70c7abc8d73803c54a5c9353c7f460f815b4f0 Issue-ID: POLICY-1903 Signed-off-by: Jim Hahn <jrh3@att.com>
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));
}
/**