aboutsummaryrefslogtreecommitdiffstats
path: root/common/src
diff options
context:
space:
mode:
authorarun chapagain <arun.chapagain@huawei.com>2020-08-06 15:44:12 +0530
committerarun chapagain <arun.chapagain@huawei.com>2020-08-06 17:49:23 +0530
commit258be88cb2a098dc526ec294b44b2859a6a845b7 (patch)
treed81ad01faf496ca12b8d31e0932d289282684972 /common/src
parentf19e5c3f6b3ef48267c74a4f973089e742e55c6c (diff)
changes for java 11 upgradation
Issue-ID: SO-3082 Signed-off-by: arun chapagain <arun.chapagain@huawei.com> Change-Id: Icb14f1a29d06d828307f0acc23d4414fecbbfaa3
Diffstat (limited to 'common/src')
-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");