Merge "Set DAO factory in request map parameters"
authorJorge Hernandez <jorge.hernandez-herrero@att.com>
Tue, 16 Apr 2019 22:07:57 +0000 (22:07 +0000)
committerGerrit Code Review <gerrit@onap.org>
Tue, 16 Apr 2019 22:07:57 +0000 (22:07 +0000)
main/src/test/java/org/onap/policy/pap/main/rest/CommonPapRestServer.java
main/src/test/java/org/onap/policy/pap/main/startstop/TestMain.java
main/src/test/java/org/onap/policy/pap/main/startstop/TestPapActivator.java

index 32eb3b2..e7b412d 100644 (file)
@@ -42,6 +42,7 @@ import org.junit.After;
 import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
 import org.onap.policy.common.gson.GsonMessageBodyHandler;
 import org.onap.policy.common.utils.coder.Coder;
 import org.onap.policy.common.utils.coder.StandardCoder;
@@ -95,6 +96,8 @@ public class CommonPapRestServer {
 
         makeConfigFile();
 
+        HttpServletServer.factory.destroy();
+
         startMain();
     }
 
index 650e824..5ed94a3 100644 (file)
@@ -28,6 +28,7 @@ import static org.junit.Assert.assertTrue;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.pap.main.PapConstants;
 import org.onap.policy.pap.main.PolicyPapException;
@@ -47,6 +48,7 @@ public class TestMain {
     @Before
     public void setUp() {
         Registry.newRegistry();
+        HttpServletServer.factory.destroy();
     }
 
     /**
index 6c9e092..f369488 100644 (file)
@@ -33,6 +33,7 @@ import java.util.Properties;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
 import org.onap.policy.common.utils.services.Registry;
 import org.onap.policy.pap.main.PapConstants;
 import org.onap.policy.pap.main.PolicyPapException;
@@ -60,6 +61,7 @@ public class TestPapActivator {
     @Before
     public void setUp() throws Exception {
         Registry.newRegistry();
+        HttpServletServer.factory.destroy();
 
         final String[] papConfigParameters =
             {"-c", "parameters/PapConfigParameters.json", "-p", "parameters/topic.properties"};