summaryrefslogtreecommitdiffstats
path: root/feature-lifecycle/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'feature-lifecycle/src/test/java')
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java10
-rw-r--r--feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java18
2 files changed, 14 insertions, 14 deletions
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
index 71245335..bb8e4940 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStateActiveTest.java
@@ -74,7 +74,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
change.setState(PdpState.ACTIVE);
change.setName(fsm.getName());
- fsm.setGroupAction("A", "a");
+ fsm.setSubGroupAction("a");
fsm.source.offer(new StandardCoder().encode(change));
controllerSupport.getController().start();
}
@@ -96,7 +96,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
private void assertActive() {
assertEquals(PdpState.ACTIVE, fsm.state());
- assertEquals("A", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("a", fsm.getSubgroup());
assertTrue(fsm.isAlive());
waitUntil(fsm.getStatusTimerSeconds() + 1, TimeUnit.SECONDS, isStatus(PdpState.ACTIVE));
@@ -164,13 +164,13 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
fsm.source.offer(new StandardCoder().encode(change));
assertEquals(PdpState.ACTIVE, fsm.state());
- assertNotEquals("B", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());;
assertNotEquals("b", fsm.getSubgroup());
change.setName(fsm.getName());
fsm.source.offer(new StandardCoder().encode(change));
assertEquals(PdpState.ACTIVE, fsm.state());
- assertEquals("A", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("a", fsm.getSubgroup());
change.setState(PdpState.SAFE);
@@ -204,7 +204,7 @@ public class LifecycleStateActiveTest extends LifecycleStateRunningTest {
assertTrue(fsm.update(update));
assertEquals(PdpState.ACTIVE, fsm.state());
- assertEquals("W", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("w", fsm.getSubgroup());
String restartV1 =
diff --git a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
index 9ecabbe8..341d9857 100644
--- a/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
+++ b/feature-lifecycle/src/test/java/org/onap/policy/drools/lifecycle/LifecycleStatePassiveTest.java
@@ -176,7 +176,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
assertEquals(PdpState.PASSIVE, fsm.state());
assertEquals(interval, fsm.getStatusTimerSeconds());
- assertEquals("Z", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("z", fsm.getSubgroup());
assertBasicPassive();
@@ -189,7 +189,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
assertEquals(PdpState.PASSIVE, fsm.state());
assertEquals(interval, fsm.getStatusTimerSeconds());
- assertEquals("Z", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("z", fsm.getSubgroup());
assertBasicPassive();
@@ -203,7 +203,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
assertEquals(PdpState.PASSIVE, fsm.state());
assertEquals(interval, fsm.getStatusTimerSeconds());
- assertNull(fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertNull(fsm.getSubgroup());
assertBasicPassive();
assertTrue(fsm.policyTypesMap.isEmpty());
@@ -216,7 +216,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
assertEquals(PdpState.PASSIVE, fsm.state());
assertEquals(interval, fsm.getStatusTimerSeconds());
- assertEquals("A", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("a", fsm.getSubgroup());
assertBasicPassive();
assertTrue(fsm.policyTypesMap.isEmpty());
@@ -232,7 +232,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
assertEquals(fsm.policiesMap.get(toscaPolicy.getIdentifier()), toscaPolicy);
assertEquals(PdpState.PASSIVE, fsm.state());
assertEquals(interval, fsm.getStatusTimerSeconds());
- assertEquals("A", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("a", fsm.getSubgroup());
assertBasicPassive();
assertEquals(0, controllerSupport.getController().getDrools().factCount("junits"));
@@ -245,7 +245,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
assertEquals(0, fsm.policiesMap.size());
assertEquals(PdpState.PASSIVE, fsm.state());
assertEquals(interval, fsm.getStatusTimerSeconds());
- assertNull(fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertNull(fsm.getSubgroup());
assertBasicPassive();
assertEquals(0, controllerSupport.getController().getDrools().factCount("junits"));
@@ -266,7 +266,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
fsm.source.offer(new StandardCoder().encode(change));
assertEquals(PdpState.PASSIVE, fsm.state());
- assertNull(fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertNull(fsm.getSubgroup());
PdpUpdate update = new PdpUpdate();
@@ -289,7 +289,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
assertEquals(1, fsm.policiesMap.size());
assertEquals(fsm.policiesMap.get(toscaPolicy.getIdentifier()), toscaPolicy);
assertEquals(PdpState.PASSIVE, fsm.state());
- assertEquals("A", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("a", fsm.getSubgroup());
assertBasicPassive();
assertEquals(0, controllerSupport.getController().getDrools().factCount("junits"));
@@ -299,7 +299,7 @@ public class LifecycleStatePassiveTest extends LifecycleStateRunningTest {
fsm.source.offer(new StandardCoder().encode(change));
assertEquals(PdpState.ACTIVE, fsm.state());
- assertEquals("A", fsm.getGroup());
+ assertEquals(LifecycleFsm.DEFAULT_PDP_GROUP, fsm.getGroup());
assertEquals("a", fsm.getSubgroup());
waitUntil(5, TimeUnit.SECONDS, () -> controllerSupport.getController().getDrools().factCount("junits") == 1);