You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/10/15 09:52:39 UTC
[camel] branch main updated: CAMEL-18608: Fix the test EndpointUriEncodingTest.test
This is an automated email from the ASF dual-hosted git repository.
nfilotto 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 9fb5280907b CAMEL-18608: Fix the test EndpointUriEncodingTest.test
9fb5280907b is described below
commit 9fb5280907b248ee695ec4c1bba3a8dfddf215a7
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Sat Oct 15 11:52:09 2022 +0200
CAMEL-18608: Fix the test EndpointUriEncodingTest.test
---
.../camel/component/master/EndpointUriEncodingTest.java | 13 +++++--------
1 file changed, 5 insertions(+), 8 deletions(-)
diff --git a/components/camel-master/src/test/java/org/apache/camel/component/master/EndpointUriEncodingTest.java b/components/camel-master/src/test/java/org/apache/camel/component/master/EndpointUriEncodingTest.java
index 8ac1a9ac189..f6ec9b9a29d 100644
--- a/components/camel-master/src/test/java/org/apache/camel/component/master/EndpointUriEncodingTest.java
+++ b/components/camel-master/src/test/java/org/apache/camel/component/master/EndpointUriEncodingTest.java
@@ -32,14 +32,15 @@ import org.apache.camel.support.DefaultEndpoint;
import org.apache.camel.test.junit5.CamelTestSupport;
import org.junit.jupiter.api.Test;
-public class EndpointUriEncodingTest extends CamelTestSupport {
+class EndpointUriEncodingTest extends CamelTestSupport {
@Test
- public void test() throws Exception {
+ void test() throws Exception {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMessageCount(1);
mock.message(0).header("foo").isEqualTo("hello} world");
mock.message(0).header("bar").isEqualTo("hello}+world");
+ mock.setResultWaitTime(60_000);
mock.assertIsSatisfied();
}
@@ -61,7 +62,7 @@ public class EndpointUriEncodingTest extends CamelTestSupport {
context().addService(fileLockClusterService);
}
- private class DummyComponent extends DefaultComponent {
+ private static class DummyComponent extends DefaultComponent {
@Override
protected Endpoint createEndpoint(String uri, String remaining, Map<String, Object> parameters) {
return new DefaultEndpoint(uri, this) {
@@ -90,15 +91,11 @@ public class EndpointUriEncodingTest extends CamelTestSupport {
Exchange exchange = createExchange(true);
exchange.getMessage().setHeader("foo", foo);
exchange.getMessage().setHeader("bar", bar);
- try {
- getProcessor().process(exchange);
- } catch (Exception e) {
- }
+ getProcessor().process(exchange);
}
};
}
};
}
}
-
}