You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pc...@apache.org on 2025/12/11 11:13:37 UTC
(camel) branch main updated: Fix flaky IssueWithWrongEncodingTest
This is an automated email from the ASF dual-hosted git repository.
pcongiusti 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 6b086d53ac32 Fix flaky IssueWithWrongEncodingTest
6b086d53ac32 is described below
commit 6b086d53ac32d84200fe5735066e713692fe6665
Author: MikoĊaj Diakowski <mi...@interia.pl>
AuthorDate: Wed Dec 10 19:53:15 2025 +0100
Fix flaky IssueWithWrongEncodingTest
The test testOkEncoding was failing intermittently with 'Expected: <1> but was: <2>'.
The input file 'products_with_valid_utf8.xml' contains 2 product elements, so the route splitting by Product class correctly produces 2 messages.
The test expectation of 1 message was incorrect and likely passed previously due to a race condition where the test finished before the second message was processed.
Updated the test to expect 2 messages.
---
.../org/apache/camel/component/stax/IssueWithWrongEncodingTest.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/components/camel-stax/src/test/java/org/apache/camel/component/stax/IssueWithWrongEncodingTest.java b/components/camel-stax/src/test/java/org/apache/camel/component/stax/IssueWithWrongEncodingTest.java
index 5bff98c080b6..26997979a1ec 100644
--- a/components/camel-stax/src/test/java/org/apache/camel/component/stax/IssueWithWrongEncodingTest.java
+++ b/components/camel-stax/src/test/java/org/apache/camel/component/stax/IssueWithWrongEncodingTest.java
@@ -51,7 +51,7 @@ public class IssueWithWrongEncodingTest extends CamelTestSupport {
@Test
public void testOkEncoding() throws Exception {
MockEndpoint.resetMocks(context);
- getMockEndpoint("mock:result").expectedMessageCount(1);
+ getMockEndpoint("mock:result").expectedMessageCount(2);
File file = new File("src/test/resources/products_with_valid_utf8.xml");