这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.baeldung.httpclient.conn;
package com.baeldung.httpclient;

import com.github.tomakehurst.wiremock.WireMockServer;
import com.github.tomakehurst.wiremock.client.WireMock;
Expand Down Expand Up @@ -27,11 +27,9 @@ public class HttpClientConnectionManagementUnitTest {
.dynamicPort();
WireMockServer firstServer = new WireMockServer(firstConfiguration);
WireMockServer secondServer = new WireMockServer(secondConfiguration);
private String firstUrl;
private String secondUrl;

private HttpClient client = HttpClient.newHttpClient();
private HttpClient secondClient = HttpClient.newHttpClient();
private final HttpClient client = HttpClient.newHttpClient();
private final HttpClient secondClient = HttpClient.newHttpClient();

private HttpRequest getRequest;
private HttpRequest secondGet;
Expand All @@ -53,8 +51,8 @@ public void setup() {
.aResponse()
.withStatus(200)));

firstUrl = "http://localhost:" + firstServer.port() + "/first";
secondUrl = "http://localhost:" + secondServer.port() + "/second";
String firstUrl = "http://localhost:" + firstServer.port() + "/first";
String secondUrl = "http://localhost:" + secondServer.port() + "/second";

getRequest = HttpRequest
.newBuilder()
Expand Down