From: liamfallon Date: Fri, 20 Apr 2018 20:08:12 +0000 (+0100) Subject: Build fails when build host running web server X-Git-Tag: v1.2.1~26 X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=commitdiff_plain;h=d73f9545331d390ab3975840dea8c4a48beef498 Build fails when build host running web server If the host on which the policy engine is running a web server that respoonds with a HTTP response on the URL "http://localhost", the build fails because one of the tests in ONAP-XACML expects a ConnectException on this URL. When the URL returns a valid respose the test fails causing the buld to fail. This fix changes the URL to "http://localhost:54287", which I guess could also exist but is much less liekly to exist. Change-Id: I2f80d12a80d29a9bc7b2067f35c286f01c4d9550 Issue-ID: POLICY-700 Signed-off-by: liamfallon --- diff --git a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java index ed7db3b8a..cf293beef 100644 --- a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java +++ b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPPolicyTest.java @@ -111,7 +111,7 @@ public class StdPDPPolicyTest { public void negTestStream() throws URISyntaxException, IOException, PAPException { // Set up test data String value = "testVal"; - URI uri = new URI("http://localhost/"); + URI uri = new URI("http://localhost:54287"); StdPDPPolicy policy = new StdPDPPolicy(value, true, value, uri, false, value, value, "1"); // Negative test stream @@ -122,7 +122,7 @@ public class StdPDPPolicyTest { public void negTestConstructor1() throws URISyntaxException, IOException { // Set up test data String value = "testVal"; - URI uri = new URI("http://localhost/"); + URI uri = new URI("http://localhost:54287"); // Test constructor StdPDPPolicy policy = new StdPDPPolicy(value, true, value, uri); @@ -133,7 +133,7 @@ public class StdPDPPolicyTest { public void negTestConstructor2() throws URISyntaxException, IOException { // Set up test data String value = "testVal"; - URI uri = new URI("http://localhost/"); + URI uri = new URI("http://localhost:54287"); Properties props = new Properties(); // Test constructor