diff options
author | mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com> | 2020-08-13 15:12:27 +0530 |
---|---|---|
committer | mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com> | 2020-08-13 15:12:27 +0530 |
commit | 51cdc697d7384bb33c3c11e377943681c8e4de0e (patch) | |
tree | 948d63abde18758f76db28ac0a779b1835cda6df /common | |
parent | 0b025460c8dc133fe0b73d8c6b7c571d0a35d743 (diff) |
Upgrade java version from 8 to 11
Issue-ID: SO-3082
Signed-off-by: mukesh.paliwal1@huawei.com <mukesh.paliwal1@huawei.com>
Change-Id: I54965e03c0674be799d78be9ede1ac2dd7dc131a
Diffstat (limited to 'common')
-rw-r--r-- | common/src/test/java/org/onap/so/client/HttpClientTest.java | 8 |
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"); |