You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by or...@apache.org on 2023/07/29 20:48:35 UTC
[camel] branch main updated: (chores) camel-plc4x: fix test flakiness (#10906)
This is an automated email from the ASF dual-hosted git repository.
orpiske 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 4a478bdde48 (chores) camel-plc4x: fix test flakiness (#10906)
4a478bdde48 is described below
commit 4a478bdde4842f944d3f5722ee458a399af020da
Author: Otavio Rodolfo Piske <or...@users.noreply.github.com>
AuthorDate: Sat Jul 29 22:48:28 2023 +0200
(chores) camel-plc4x: fix test flakiness (#10906)
Send synchronously to avoid the unpredictable behavior of sending async and not checking the result
Signed-off-by: Otavio R. Piske <an...@gmail.com>
---
.../java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java | 4 ++--
.../java/org/apache/camel/component/plc4x/Plc4XComponentTest.java | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java
index 9939e5b7565..19e0b3b2406 100644
--- a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java
+++ b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTagTest.java
@@ -31,8 +31,8 @@ public class Plc4XComponentTagTest extends CamelTestSupport {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMinimumMessageCount(1);
mock.expectedMessageCount(2);
- template.asyncSendBody("direct:plc4x", Collections.singletonList("irrelevant"));
- template.asyncSendBody("direct:plc4x2", Collections.singletonList("irrelevant"));
+ template.sendBody("direct:plc4x", Collections.singletonList("irrelevant"));
+ template.sendBody("direct:plc4x2", Collections.singletonList("irrelevant"));
MockEndpoint.assertIsSatisfied(context, 2, TimeUnit.SECONDS);
}
diff --git a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
index e42eadbc70d..ec56bc95b4c 100644
--- a/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
+++ b/components/camel-plc4x/src/test/java/org/apache/camel/component/plc4x/Plc4XComponentTest.java
@@ -31,8 +31,8 @@ public class Plc4XComponentTest extends CamelTestSupport {
MockEndpoint mock = getMockEndpoint("mock:result");
mock.expectedMinimumMessageCount(1);
mock.expectedMessageCount(2);
- template.asyncSendBody("direct:plc4x", Collections.singletonList("irrelevant"));
- template.asyncSendBody("direct:plc4x2", Collections.singletonList("irrelevant"));
+ template.sendBody("direct:plc4x", Collections.singletonList("irrelevant"));
+ template.sendBody("direct:plc4x2", Collections.singletonList("irrelevant"));
MockEndpoint.assertIsSatisfied(context, 2, TimeUnit.SECONDS);
}