summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java3
-rw-r--r--rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTaskTest.java3
2 files changed, 2 insertions, 4 deletions
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java
index 574432c..8423f3d 100644
--- a/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java
+++ b/rulemgt/src/main/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTask.java
@@ -41,7 +41,6 @@ public class ConfigFileScanningTask implements Runnable {
final public static long POLLING_PERIOD = 30L;
final private static Logger LOGGER = LoggerFactory.getLogger(ConfigFileScanningTask.class);
final private static long FILE_SIZE_LMT = 1024 * 1024 * 10; // 10MB
- final private Map<String, String> configInEffect = new HashMap(); // Contents for configInEffect are <closedControlLoop>:<ruleContents> pairs.
private String configFile = "/opt/hrmrules/index.json";
private ConfigFileScanner configFileScanner;
private String url;
@@ -69,6 +68,8 @@ public class ConfigFileScanningTask implements Runnable {
return;
}
+ // Contents for configInEffect are <closedControlLoop>:<ruleContents> pairs.
+ Map<String, String> configInEffect = new HashMap();
for (RuleResult4API ruleResult4API : deployedRules) {
configInEffect.put(ruleResult4API.getLoopControlName(), ruleResult4API.getContent());
}
diff --git a/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTaskTest.java b/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTaskTest.java
index 75f60b6..0f0f81a 100644
--- a/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTaskTest.java
+++ b/rulemgt/src/test/java/org/onap/holmes/rulemgt/dcae/ConfigFileScanningTaskTest.java
@@ -105,12 +105,9 @@ public class ConfigFileScanningTaskTest {
String clName = "ControlLoop-VOLTE-2179b738-fd36-4843-a71a-a8c24c70c55b";
String indexPath = getFilePath("index-add.json");
String contents = FileUtils.readTextFile(indexPath);
- Map<String, String> configInEffect = new HashMap<>();
- configInEffect.put(clName, contents);
ConfigFileScanningTask cfst = new ConfigFileScanningTask(new ConfigFileScanner());
Whitebox.setInternalState(cfst, "configFile", getFilePath("index-empty.json"));
- Whitebox.setInternalState(cfst, "configInEffect", configInEffect);
// mock for getExistingRules
JerseyClient jcMock = PowerMock.createMock(JerseyClient.class);