Merge "Copy policy-endpoints from drools-pdp to common"
authorPamela Dragosh <pdragosh@research.att.com>
Fri, 27 Jul 2018 16:16:22 +0000 (16:16 +0000)
committerGerrit Code Review <gerrit@onap.org>
Fri, 27 Jul 2018 16:16:22 +0000 (16:16 +0000)
ONAP-PDP/pom.xml
ONAP-PDP/src/test/java/org/onap/policy/xacml/action/FindActionTest.java

index d664cf4..a616edd 100644 (file)
@@ -81,9 +81,9 @@
                        </exclusions>
                </dependency>
                <dependency>
-                       <groupId>org.onap.policy.drools-pdp</groupId>
+                       <groupId>org.onap.policy.common</groupId>
                        <artifactId>policy-endpoints</artifactId>
-                        <version>${project.version}</version>
+                       <version>${project.version}</version>
                        <scope>test</scope>
                </dependency>
        </dependencies>
index f8a5e4b..93cb285 100644 (file)
@@ -45,8 +45,9 @@ import org.junit.AfterClass;
 import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.onap.policy.drools.http.server.HttpServletServer;
-import org.onap.policy.drools.utils.NetworkUtil;
+import org.onap.policy.common.endpoints.http.server.HttpServletServer;
+import org.onap.policy.common.endpoints.http.server.impl.IndexedHttpServletServerFactory;
+import org.onap.policy.common.utils.network.NetworkUtil;
 import org.onap.policy.xacml.custom.OnapFunctionDefinitionFactory;
 
 public class FindActionTest {
@@ -68,8 +69,8 @@ public class FindActionTest {
     @BeforeClass
     public static void setUpServer() {
         try {
-            final HttpServletServer testServer =
-                    HttpServletServer.factory.build("dmaapSim", "localhost", MOCK_SERVER_PORT, "/", false, true);
+            final HttpServletServer testServer = IndexedHttpServletServerFactory.getInstance().build("dmaapSim",
+                    "localhost", MOCK_SERVER_PORT, "/", false, true);
             testServer.addServletClass("/*", DummyRest.class.getName());
             testServer.waitedStart(2000);
             if (!NetworkUtil.isTcpPortOpen("localhost", testServer.getPort(), 5, 10000L)) {
@@ -83,7 +84,7 @@ public class FindActionTest {
 
     @AfterClass
     public static void tearDownSimulator() {
-        HttpServletServer.factory.destroy();
+        IndexedHttpServletServerFactory.getInstance().destroy();
     }
 
     /**