summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java4
-rw-r--r--utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java6
2 files changed, 5 insertions, 5 deletions
diff --git a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java
index 82faa052..0aec411b 100644
--- a/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java
+++ b/policy-endpoints/src/test/java/org/onap/policy/common/endpoints/http/server/test/HttpServerTest.java
@@ -486,7 +486,7 @@ public class HttpServerTest {
private String http(String urlString)
throws IOException, InterruptedException {
URL url = new URL(urlString);
- if (!NetworkUtil.isTcpPortOpen(url.getHost(), url.getPort(), 25, 2)) {
+ if (!NetworkUtil.isTcpPortOpen(url.getHost(), url.getPort(), 25, 100)) {
throw new IllegalStateException("port never opened: " + url);
}
return response(url.openConnection());
@@ -502,7 +502,7 @@ public class HttpServerTest {
private String http(String urlString, String mediaType, String post)
throws IOException, InterruptedException {
URL url = new URL(urlString);
- if (!NetworkUtil.isTcpPortOpen(url.getHost(), url.getPort(), 25, 2)) {
+ if (!NetworkUtil.isTcpPortOpen(url.getHost(), url.getPort(), 25, 100)) {
throw new IllegalStateException("port never opened: " + url);
}
HttpURLConnection conn = (HttpURLConnection) url.openConnection();
diff --git a/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java b/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java
index 8f714a49..af98e300 100644
--- a/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java
+++ b/utils/src/test/java/org/onap/policy/common/utils/resources/ResourceUtilsTest.java
@@ -336,9 +336,9 @@ public class ResourceUtilsTest {
assertEquals(189, resultJ0.size());
assertEquals("com/google/", normalizePath(resultJ0.iterator().next()));
- Set<String> resultJ1 = ResourceUtils.getDirectoryContents("com/google/gson/util");
- assertEquals(1, resultJ1.size());
- assertEquals("com/google/gson/util/VersionUtils.class", normalizePath(resultJ1.iterator().next()));
+ Set<String> resultJ1 = ResourceUtils.getDirectoryContents("com/google/gson");
+ assertTrue(resultJ1.size() > 1);
+ assertTrue(resultJ1.contains("com/google/gson/JsonElement.class"));
URL dummyUrl = new URL("http://even/worse");
assertTrue(ResourceUtils.getDirectoryContentsJar(dummyUrl, "nonexistantdirectory").isEmpty());