summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
authorSeshu Kumar M <seshu.kumar.m@huawei.com>2020-08-07 05:37:05 +0000
committerGerrit Code Review <gerrit@onap.org>2020-08-07 05:37:05 +0000
commit8d22b943bd389d81fe9ea10ee4c1f2d27326910a (patch)
treec209de35fdb6e9ae8e168e48caa60edf6ba04e96 /common
parentcdc8d1abcb4aceeb44eacd5df3a5a0ba817c3318 (diff)
parent258be88cb2a098dc526ec294b44b2859a6a845b7 (diff)
Merge "changes for java 11 upgradation Issue-ID: SO-3082"
Diffstat (limited to 'common')
-rw-r--r--common/src/test/java/org/onap/so/client/HttpClientTest.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/common/src/test/java/org/onap/so/client/HttpClientTest.java b/common/src/test/java/org/onap/so/client/HttpClientTest.java
index a01e2bb812..e9e8fe7853 100644
--- a/common/src/test/java/org/onap/so/client/HttpClientTest.java
+++ b/common/src/test/java/org/onap/so/client/HttpClientTest.java
@@ -40,7 +40,7 @@ public class HttpClientTest {
private final HttpClientFactory httpClientFactory = new HttpClientFactory();
@Rule
- public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicHttpsPort());
+ public WireMockRule wireMockRule = new WireMockRule(wireMockConfig().dynamicPort().dynamicHttpsPort());
@Test
public void testPost_success() throws MalformedURLException {
@@ -48,7 +48,7 @@ public class HttpClientTest {
wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post"))
.willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody("")));
- URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post");
+ URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
client.addBasicAuthHeader(
@@ -67,7 +67,7 @@ public class HttpClientTest {
wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post"))
.willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody("")));
- URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post");
+ URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
client.addAdditionalHeader("Accept", "application/json");
@@ -85,7 +85,7 @@ public class HttpClientTest {
wireMockRule.stubFor(post(urlEqualTo("/services/sdnc/post"))
.willReturn(aResponse().withStatus(200).withHeader("Content-Type", "application/json").withBody("")));
- URL url = new URL("http://localhost:" + wireMockConfig().portNumber() + "/services/sdnc/post");
+ URL url = new URL("http://localhost:" + wireMockRule.port() + "/services/sdnc/post");
HttpClient client = httpClientFactory.newJsonClient(url, ONAPComponents.BPMN);
client.addBasicAuthHeader("", "12345");