github-advanced-security[bot] commented on code in PR #19567:
URL: https://github.com/apache/druid/pull/19567#discussion_r3965870405
##########
processing/src/test/java/org/apache/druid/java/util/http/client/JankyServersTest.java:
##########
@@ -410,11 +423,54 @@
final ExecutionException exception =
Assertions.assertThrows(ExecutionException.class, response::get);
Assertions.assertTrue(
-
exception.getMessage().contains("org.jboss.netty.channel.ChannelException:
Faulty channel in resource pool")
+ exception.getMessage().contains("io.netty.channel.ChannelException:
Faulty channel in resource pool")
);
}
finally {
lifecycle.stop();
}
}
+
+ @Test
+ public void testSilentProxyCONNECT() throws Throwable
+ {
+ final Lifecycle lifecycle = new Lifecycle();
+ try {
+ final HttpClientConfig config = HttpClientConfig
+ .builder()
+ .withSslContext(SSLContext.getDefault())
+ .withHttpProxyConfig(new HttpClientProxyConfig("localhost",
silentServerSocket.getLocalPort(), null, null))
+ .withSslHandshakeTimeout(Duration.millis(500))
+ .build();
+ final HttpClient client = HttpClientInit.createClient(config, lifecycle);
+
+ final long start = System.nanoTime();
+ final ListenableFuture<StatusResponseHolder> response = client
+ .go(
+ new Request(HttpMethod.GET, new URL("https://example.com/")),
Review Comment:
## CodeQL / Deprecated method or constructor invocation
Invoking [URL.URL](1) should be avoided because it has been deprecated.
[Show more
details](https://github.com/apache/druid/security/code-scanning/11942)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]