Skip to content

Commit ad38a12

Browse files
committed
8371557: java/net/httpclient/http3/H3RequestRejectedTest.java: javax.net.ssl.SSLHandshakeException: local endpoint (wildcard) and remote endpoint (loopback) ports conflict
Reviewed-by: jpai
1 parent b41146c commit ad38a12

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

test/jdk/java/net/httpclient/http3/H3RequestRejectedTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@
5050
import static java.net.http.HttpOption.Http3DiscoveryMode.HTTP_3_URI_ONLY;
5151
import static java.net.http.HttpRequest.BodyPublishers;
5252
import static java.nio.charset.StandardCharsets.US_ASCII;
53+
import static jdk.httpclient.test.lib.common.HttpServerAdapters.createClientBuilderForH3;
5354
import static org.junit.jupiter.api.Assertions.assertEquals;
5455
import static org.junit.jupiter.api.Assertions.assertFalse;
5556
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -100,7 +101,7 @@ static void afterAll() throws Exception {
100101
*/
101102
@Test
102103
void testAlwaysRejected() throws Exception {
103-
try (final HttpClient client = HttpClient.newBuilder()
104+
try (final HttpClient client = createClientBuilderForH3()
104105
.sslContext(sslContext).proxy(NO_PROXY).version(HTTP_3)
105106
.build()) {
106107

@@ -134,7 +135,7 @@ void testAlwaysRejected() throws Exception {
134135
*/
135136
@Test
136137
void testRejectedRequest() throws Exception {
137-
try (final HttpClient client = HttpClient.newBuilder().sslContext(sslContext)
138+
try (final HttpClient client = createClientBuilderForH3().sslContext(sslContext)
138139
.proxy(NO_PROXY).version(HTTP_3)
139140
.build()) {
140141

0 commit comments

Comments
 (0)