summaryrefslogtreecommitdiffstats
path: root/controlloop
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-10-27 15:31:19 -0500
committerJorge Hernandez <jh1730@att.com>2017-10-27 15:31:19 -0500
commitc9d429d17c8e19620ff760870d295ce05d5190af (patch)
tree5f202d34950bb1270ac2208552c6d1a221566312 /controlloop
parenta1a5073f6e0cdec19addc5fdec474a5a3758adb3 (diff)
remove explicit call to shutdown in junits
since it will exit the process immediately in a graceful case and affect junit execution. Change-Id: Ibcbb65269203e189515f68c557686c29667307e2 Issue-ID: POLICY-386 Signed-off-by: Jorge Hernandez <jh1730@att.com>
Diffstat (limited to 'controlloop')
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java5
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java1
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java7
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VDNSControlLoopTest.java11
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java11
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java7
6 files changed, 27 insertions, 15 deletions
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java
index 9b3fbfe72..869a1a6ff 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/ControlLoopFailureTest.java
@@ -52,6 +52,7 @@ import org.onap.policy.drools.http.server.HttpServletServer;
import org.onap.policy.drools.properties.PolicyProperties;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder;
import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
+import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -120,10 +121,10 @@ public class ControlLoopFailureTest implements TopicListener {
*/
kieSession.dispose();
+ PolicyEngine.manager.stop();
HttpServletServer.factory.destroy();
- PolicyEngine.manager.shutdown();
+ PolicyController.factory.shutdown();
TopicEndpoint.manager.shutdown();
- PolicyEngine.manager.stop();
}
/**
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java
index ab365af77..2149bc779 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/Util.java
@@ -31,7 +31,6 @@ import java.nio.charset.StandardCharsets;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.util.Properties;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
index 8885a23c6..aaa40d1ad 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VCPEControlLoopTest.java
@@ -52,7 +52,9 @@ import org.onap.policy.drools.http.server.HttpServletServer;
import org.onap.policy.drools.properties.PolicyProperties;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder;
import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
+import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.drools.utils.LoggerUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -71,6 +73,7 @@ public class VCPEControlLoopTest implements TopicListener {
Util.setAAIProps();
Util.setGuardProps();
Util.setPUProp();
+ LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@BeforeClass
@@ -116,10 +119,10 @@ public class VCPEControlLoopTest implements TopicListener {
*/
kieSession.dispose();
+ PolicyEngine.manager.stop();
HttpServletServer.factory.destroy();
- PolicyEngine.manager.shutdown();
+ PolicyController.factory.shutdown();
TopicEndpoint.manager.shutdown();
- PolicyEngine.manager.stop();
}
@Test
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VDNSControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VDNSControlLoopTest.java
index 9b9c2fe7c..3e1785d18 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VDNSControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VDNSControlLoopTest.java
@@ -51,7 +51,9 @@ import org.onap.policy.drools.http.server.HttpServletServer;
import org.onap.policy.drools.properties.PolicyProperties;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder;
import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
+import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.drools.utils.LoggerUtil;
import org.onap.policy.so.SORequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -72,6 +74,7 @@ public class VDNSControlLoopTest implements TopicListener {
Util.setSOProps();
Util.setGuardProps();
Util.setPUProp();
+ LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@BeforeClass
@@ -118,10 +121,10 @@ public class VDNSControlLoopTest implements TopicListener {
*/
kieSession.dispose();
- HttpServletServer.factory.destroy();
- PolicyEngine.manager.shutdown();
- TopicEndpoint.manager.shutdown();
- PolicyEngine.manager.stop();
+ PolicyEngine.manager.stop();
+ HttpServletServer.factory.destroy();
+ PolicyController.factory.shutdown();
+ TopicEndpoint.manager.shutdown();
}
@Test
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java
index 4a2b81399..2581e3d80 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFCControlLoopTest.java
@@ -52,7 +52,9 @@ import org.onap.policy.drools.http.server.HttpServletServer;
import org.onap.policy.drools.properties.PolicyProperties;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder;
import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
+import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.drools.utils.LoggerUtil;
import org.onap.policy.vfc.VFCRequest;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -74,6 +76,7 @@ public class VFCControlLoopTest implements TopicListener {
Util.setVFCProps();
Util.setGuardProps();
Util.setPUProp();
+ LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@BeforeClass
@@ -120,10 +123,10 @@ public class VFCControlLoopTest implements TopicListener {
*/
kieSession.dispose();
- HttpServletServer.factory.destroy();
- PolicyEngine.manager.shutdown();
- TopicEndpoint.manager.shutdown();
- PolicyEngine.manager.stop();
+ PolicyEngine.manager.stop();
+ HttpServletServer.factory.destroy();
+ PolicyController.factory.shutdown();
+ TopicEndpoint.manager.shutdown();
}
@Test
diff --git a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java
index 015798491..601eef0eb 100644
--- a/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java
+++ b/controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java
@@ -54,7 +54,9 @@ import org.onap.policy.drools.http.server.HttpServletServer;
import org.onap.policy.drools.properties.PolicyProperties;
import org.onap.policy.drools.protocol.coders.EventProtocolCoder;
import org.onap.policy.drools.protocol.coders.JsonProtocolFilter;
+import org.onap.policy.drools.system.PolicyController;
import org.onap.policy.drools.system.PolicyEngine;
+import org.onap.policy.drools.utils.LoggerUtil;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -73,6 +75,7 @@ public class VFWControlLoopTest implements TopicListener {
Util.setAAIProps();
Util.setGuardProps();
Util.setPUProp();
+ LoggerUtil.setLevel(LoggerUtil.ROOT_LOGGER, "INFO");
}
@BeforeClass
@@ -120,10 +123,10 @@ public class VFWControlLoopTest implements TopicListener {
*/
kieSession.dispose();
+ PolicyEngine.manager.stop();
HttpServletServer.factory.destroy();
- PolicyEngine.manager.shutdown();
+ PolicyController.factory.shutdown();
TopicEndpoint.manager.shutdown();
- PolicyEngine.manager.stop();
}
@Test