This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new c06165c CAMEL-17521: camel-http - Added unit test reproducing bug
c06165c is described below
commit c06165c45ff63ac0aa5957f1a904ba4aa018c7cb
Author: Claus Ibsen <[email protected]>
AuthorDate: Fri Jan 21 12:47:51 2022 +0100
CAMEL-17521: camel-http - Added unit test reproducing bug
---
.../apache/camel/component/http/HttpToDSOTimeoutTest.java | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
index 2495853..0c3930a 100644
---
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
+++
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpToDSOTimeoutTest.java
@@ -49,6 +49,10 @@ public class HttpToDSOTimeoutTest extends BaseHttpTest {
new BasicValidationHandler(
"/bar", GET.name(), null, null,
getExpectedContent()))
+ .registerHandler("/baz",
+ new BasicValidationHandler(
+ "/baz", GET.name(), null, null,
+ getExpectedContent()))
.create();
localServer.start();
@@ -84,6 +88,14 @@ public class HttpToDSOTimeoutTest extends BaseHttpTest {
assertExchange(exchange);
}
+ @Test
+ public void httpToDoff() throws Exception {
+ Exchange exchange = template.request("direct:toDoff",
+ exchange1 -> {
+ });
+ assertExchange(exchange);
+ }
+
@Override
protected RoutesBuilder createRouteBuilder() throws Exception {
return new RouteBuilder() {
@@ -94,6 +106,9 @@ public class HttpToDSOTimeoutTest extends BaseHttpTest {
from("direct:toD")
.toD(baseUrl + "/bar?httpClient.SocketTimeout=5000");
+
+ from("direct:toDoff")
+ .toD().allowOptimisedComponents(false).uri(baseUrl +
"/baz?httpClient.SocketTimeout=5000");
}
};
}