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 3a704ae6505 Regen for commit 4766731eb75c27249bf790a61056d08156f865a5
(#8160)
3a704ae6505 is described below
commit 3a704ae650522c144ec2245d3f59790ddeacde35
Author: github-actions[bot]
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Sun Aug 14 09:10:58 2022 +0200
Regen for commit 4766731eb75c27249bf790a61056d08156f865a5 (#8160)
Signed-off-by: GitHub <[email protected]>
Signed-off-by: GitHub <[email protected]>
Co-authored-by: davsclaus <[email protected]>
---
.../HttpSendDynamicAwareUriWithoutSlashTest.java | 29 +++++++++++++---------
1 file changed, 17 insertions(+), 12 deletions(-)
diff --git
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java
index bfb3e9c9e12..250f276c51a 100644
---
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java
+++
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpSendDynamicAwareUriWithoutSlashTest.java
@@ -17,6 +17,7 @@
package org.apache.camel.component.http;
import java.util.Map;
+
import org.apache.camel.Endpoint;
import org.apache.camel.Exchange;
import org.apache.camel.RoutesBuilder;
@@ -40,9 +41,9 @@ public class HttpSendDynamicAwareUriWithoutSlashTest extends
BaseHttpTest {
@Override
public void setUp() throws Exception {
localServer =
ServerBootstrap.bootstrap().setHttpProcessor(getBasicHttpProcessor())
-
.setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
-
.setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
- .registerHandler("/users/*", new BasicValidationHandler("GET",
null, null, "a user")).create();
+
.setConnectionReuseStrategy(getConnectionReuseStrategy()).setResponseFactory(getHttpResponseFactory())
+
.setExpectationVerifier(getHttpExpectationVerifier()).setSslContext(getSSLContext())
+ .registerHandler("/users/*", new BasicValidationHandler("GET",
null, null, "a user")).create();
localServer.start();
super.setUp();
@@ -64,22 +65,24 @@ public class HttpSendDynamicAwareUriWithoutSlashTest
extends BaseHttpTest {
@Override
public void configure() throws Exception {
from("direct:usersDrink")
- .toD("http://localhost:" + localServer.getLocalPort()
- + "/users/${exchangeProperty.user}");
+ .toD("http://localhost:" + localServer.getLocalPort()
+ + "/users/${exchangeProperty.user}");
from("direct:usersDrinkWithoutSlash")
- .toD("http:localhost:" + localServer.getLocalPort()
- + "/users/${exchangeProperty.user}");
+ .toD("http:localhost:" + localServer.getLocalPort()
+ + "/users/${exchangeProperty.user}");
}
};
}
@Test
public void testDynamicAware() throws Exception {
- Exchange out =
fluentTemplate.to("direct:usersDrink").withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"joes").build()).send();
+ Exchange out = fluentTemplate.to("direct:usersDrink")
+
.withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"joes").build()).send();
assertEquals("a user", out.getMessage().getBody(String.class));
- out =
fluentTemplate.to("direct:usersDrink").withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"moes").build()).send();
+ out = fluentTemplate.to("direct:usersDrink")
+
.withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"moes").build()).send();
assertEquals("a user", out.getMessage().getBody(String.class));
// and there should only be one http endpoint as they are both on same
host
@@ -89,13 +92,15 @@ public class HttpSendDynamicAwareUriWithoutSlashTest
extends BaseHttpTest {
assertTrue(endpointMap.containsKey("direct://usersDrinkWithoutSlash"),
"Should find direct");
assertEquals(3, endpointMap.size());
}
-
+
@Test
public void testDynamicAwareWithoutSlash() throws Exception {
- Exchange out =
fluentTemplate.to("direct:usersDrinkWithoutSlash").withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"joes").build()).send();
+ Exchange out = fluentTemplate.to("direct:usersDrinkWithoutSlash")
+
.withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"joes").build()).send();
assertEquals("a user", out.getMessage().getBody(String.class));
- out =
fluentTemplate.to("direct:usersDrinkWithoutSlash").withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"moes").build()).send();
+ out = fluentTemplate.to("direct:usersDrinkWithoutSlash")
+
.withExchange(ExchangeBuilder.anExchange(context).withProperty("user",
"moes").build()).send();
assertEquals("a user", out.getMessage().getBody(String.class));
// and there should only be one http endpoint as they are both on same
host