summaryrefslogtreecommitdiffstats
path: root/controlloop/common/rules-test/src
diff options
context:
space:
mode:
Diffstat (limited to 'controlloop/common/rules-test/src')
-rw-r--r--controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java11
-rw-r--r--controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunner2Test.java (renamed from controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunnerTest2.java)2
2 files changed, 9 insertions, 4 deletions
diff --git a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
index f5346def8..83825bca9 100644
--- a/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
+++ b/controlloop/common/rules-test/src/main/java/org/onap/policy/controlloop/common/rules/test/BaseTest.java
@@ -30,6 +30,7 @@ import java.util.function.Supplier;
import java.util.stream.Collectors;
import lombok.AccessLevel;
import lombok.Getter;
+import lombok.Setter;
import org.awaitility.Awaitility;
import org.junit.Test;
import org.onap.policy.appc.Request;
@@ -55,6 +56,9 @@ public abstract class BaseTest {
private static final String APPC_RESTART_OP = "restart";
private static final String APPC_MODIFY_CONFIG_OP = "ModifyConfig";
+ private static final String SDNR_MODIFY_CONFIG_OP = "ModifyConfig";
+ private static final String SNDR_MODIFY_CONFIG_ANR_OP = "ModifyConfigANR";
+
/*
* Canonical Topic Names.
*/
@@ -135,6 +139,7 @@ public abstract class BaseTest {
// used to inject and wait for messages
@Getter(AccessLevel.PROTECTED)
+ @Setter(AccessLevel.PROTECTED)
protected static Topics topics;
// used to wait for messages on SINK topics
@@ -168,7 +173,7 @@ public abstract class BaseTest {
* Initializes {@link #topics} and {@link #controller}.
*/
public void init() {
- topics = topicMaker.get();
+ setTopics(topicMaker.get());
Map<String, SimpleLock> locks = getLockMap();
if (locks != null) {
@@ -348,7 +353,7 @@ public abstract class BaseTest {
*/
@Test
public void testVpciSunnyDayCompliant() {
- sdnrSunnyDay(VPCI_TOSCA_COMPLIANT_POLICY, VPCI_ONSET, VPCI_SDNR_SUCCESS, "ModifyConfig");
+ sdnrSunnyDay(VPCI_TOSCA_COMPLIANT_POLICY, VPCI_ONSET, VPCI_SDNR_SUCCESS, SDNR_MODIFY_CONFIG_OP);
}
// VSONH
@@ -358,7 +363,7 @@ public abstract class BaseTest {
*/
@Test
public void testVsonhSunnyDayCompliant() {
- sdnrSunnyDay(VSONH_TOSCA_COMPLIANT_POLICY, VSONH_ONSET, VSONH_SDNR_SUCCESS, "ModifyConfigANR");
+ sdnrSunnyDay(VSONH_TOSCA_COMPLIANT_POLICY, VSONH_ONSET, VSONH_SDNR_SUCCESS, SNDR_MODIFY_CONFIG_ANR_OP);
}
/**
diff --git a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunnerTest2.java b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunner2Test.java
index 1ed5b20bc..91e19ce79 100644
--- a/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunnerTest2.java
+++ b/controlloop/common/rules-test/src/test/java/org/onap/policy/controlloop/common/rules/test/NamedRunner2Test.java
@@ -32,7 +32,7 @@ import org.junit.runner.RunWith;
* executed.
*/
@RunWith(NamedRunner.class)
-public class NamedRunnerTest2 {
+public class NamedRunner2Test {
private static int testCount = 0;