aboutsummaryrefslogtreecommitdiffstats
path: root/controlloop/templates
diff options
context:
space:
mode:
authorJorge Hernandez <jh1730@att.com>2017-09-13 13:59:58 +0000
committerGerrit Code Review <gerrit@onap.org>2017-09-13 13:59:58 +0000
commitbc4267d043427c080b1cc1fe42ea0860bed9fa97 (patch)
tree7579c0e66a53bbb1cde15f1eef38bbb0e8227751 /controlloop/templates
parentdbf8cdaec4b7fc8378b317fdb169eab45fcfadc8 (diff)
parentc226d61d3c1266f592fc3d785164aedb34a25ef6 (diff)
Merge "Fix A&AI Named Query for vFW"
Diffstat (limited to 'controlloop/templates')
-rw-r--r--controlloop/templates/template.demo/src/test/java/org/onap/policy/template/demo/VFWControlLoopTest.java17
1 files changed, 17 insertions, 0 deletions
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 e2b688d5d..49cbf5227 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
@@ -28,6 +28,8 @@ import java.time.Instant;
import java.util.HashMap;
import java.util.UUID;
+import org.junit.AfterClass;
+import org.junit.BeforeClass;
import org.junit.Test;
import org.kie.api.runtime.KieSession;
import org.kie.api.runtime.rule.FactHandle;
@@ -40,6 +42,7 @@ import org.onap.policy.controlloop.VirtualControlLoopEvent;
import org.onap.policy.controlloop.VirtualControlLoopNotification;
import org.onap.policy.controlloop.policy.ControlLoopPolicy;
import org.onap.policy.controlloop.policy.TargetType;
+import org.onap.policy.drools.http.server.HttpServletServer;
import org.onap.policy.drools.impl.PolicyEngineJUnitImpl;
import org.onap.policy.guard.PolicyGuard;
import org.slf4j.Logger;
@@ -53,6 +56,20 @@ public class VFWControlLoopTest {
private Util.Pair<ControlLoopPolicy, String> pair;
private PolicyEngineJUnitImpl engine;
+ @BeforeClass
+ public static void setUpSimulator() {
+ try {
+ Util.buildAaiSim();
+ } catch (InterruptedException e) {
+ fail(e.getMessage());
+ }
+ }
+
+ @AfterClass
+ public static void tearDownSimulator() {
+ HttpServletServer.factory.destroy();
+ }
+
@Test
public void successTest() {