This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new a02012d329 [NettyHttp] Increase proxy connection timeout and make it
configurable
a02012d329 is described below
commit a02012d329518f5c226cea5dbe856acb1cc7494b
Author: Andrej Vano <[email protected]>
AuthorDate: Thu Apr 4 14:19:19 2024 +0200
[NettyHttp] Increase proxy connection timeout and make it configurable
---
.../apache/camel/quarkus/component/http/common/HttpTestResource.java | 1 +
.../component/http/netty/ProxyCapableClientInitializerFactory.java | 2 +-
2 files changed, 2 insertions(+), 1 deletion(-)
diff --git
a/integration-test-groups/http/common/src/test/java/org/apache/camel/quarkus/component/http/common/HttpTestResource.java
b/integration-test-groups/http/common/src/test/java/org/apache/camel/quarkus/component/http/common/HttpTestResource.java
index 72ddc21652..270e4dfdff 100644
---
a/integration-test-groups/http/common/src/test/java/org/apache/camel/quarkus/component/http/common/HttpTestResource.java
+++
b/integration-test-groups/http/common/src/test/java/org/apache/camel/quarkus/component/http/common/HttpTestResource.java
@@ -52,6 +52,7 @@ public class HttpTestResource implements
QuarkusTestResourceLifecycleManager {
"camel.netty-http.https-test-port",
"camel.netty-http.compression-test-port");
options.put("proxy.host", "localhost");
+ options.put("proxy.connection.timeout", "10000");
server = new ProxyServer(Integer.parseInt(options.get("proxy.port")),
USER_ADMIN, USER_ADMIN_PASSWORD);
server.start();
diff --git
a/integration-test-groups/http/netty-http/src/main/java/org/apache/camel/quarkus/component/http/netty/ProxyCapableClientInitializerFactory.java
b/integration-test-groups/http/netty-http/src/main/java/org/apache/camel/quarkus/component/http/netty/ProxyCapableClientInitializerFactory.java
index 9f3e544684..f1a8b36471 100644
---
a/integration-test-groups/http/netty-http/src/main/java/org/apache/camel/quarkus/component/http/netty/ProxyCapableClientInitializerFactory.java
+++
b/integration-test-groups/http/netty-http/src/main/java/org/apache/camel/quarkus/component/http/netty/ProxyCapableClientInitializerFactory.java
@@ -46,7 +46,7 @@ public class ProxyCapableClientInitializerFactory extends
HttpClientInitializerF
Integer proxyPort = config.getValue("proxy.port", Integer.class);
InetSocketAddress proxyServerAddress = new
InetSocketAddress(proxyHost, proxyPort);
HttpProxyHandler httpProxyHandler = new
HttpProxyHandler(proxyServerAddress, USER_ADMIN, USER_ADMIN_PASSWORD);
- httpProxyHandler.setConnectTimeoutMillis(5000);
+
httpProxyHandler.setConnectTimeoutMillis(config.getValue("proxy.connection.timeout",
Long.class));
super.initChannel(channel);
channel.pipeline().addFirst(httpProxyHandler);
}