Skip to content

Commit 7ee44a0

Browse files
committed
Add 'localhost' to WithProxy localhost declarations.
1 parent 06675c9 commit 7ee44a0

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

vertx-core/src/test/java/io/vertx/test/proxy/WithProxy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@
2222

2323
ProxyKind kind();
2424

25-
String[] localhosts() default "";
25+
String[] localhosts() default {};
2626

2727
}

vertx-core/src/test/java/io/vertx/tests/http/Http1xProxyTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ public void testNonProxyHosts1() throws Exception {
139139
testNonProxyHosts(Collections.singletonList("www1.example1.com"), "www1.example1.com", false);
140140
}
141141

142-
@WithProxy(kind = ProxyKind.HTTP, localhosts = "www2.example1.com")
142+
@WithProxy(kind = ProxyKind.HTTP, localhosts = {"localhost", "www2.example1.com"})
143143
@Test
144144
public void testNonProxyHosts2() throws Exception {
145145
testNonProxyHosts(Collections.singletonList("www1.example1.com"), "www2.example1.com", true);

vertx-core/src/test/java/io/vertx/tests/tls/HttpTLSTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,7 +1554,7 @@ private void testProxy(ProxyType proxyType) throws Exception {
15541554
assertEquals("hostname resolved but it shouldn't be", DEFAULT_HTTPS_HOST_AND_PORT, proxy.lastUri());
15551555
}
15561556

1557-
@WithProxy(kind = ProxyKind.HTTP, localhosts = "host2.com")
1557+
@WithProxy(kind = ProxyKind.HTTP, localhosts = { "localhost", "host2.com"})
15581558
@Test
15591559
// Access https server via connect proxy
15601560
public void testHttpsProxyWithSNI() throws Exception {
@@ -1615,7 +1615,7 @@ public void testHttpsSocks() throws Exception {
16151615
testProxy(ProxyType.SOCKS5);
16161616
}
16171617

1618-
@WithProxy(kind = ProxyKind.SOCKS5, localhosts = "host2.com")
1618+
@WithProxy(kind = ProxyKind.SOCKS5, localhosts = { "localhost", "host2.com" })
16191619
@Test
16201620
// Access https server via socks5 proxy
16211621
public void testHttpsSocksWithSNI() throws Exception {

0 commit comments

Comments
 (0)