This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch investigate-and-fix-camel-24022-fix-flaky-xsltfro in repository https://gitbox.apache.org/repos/asf/camel.git
commit d702cc176fbe3e64e4cca5a2bf3acc4dffa86bc8 Author: Guillaume Nodet <[email protected]> AuthorDate: Tue Jul 28 19:07:46 2026 +0200 CAMEL-24022: Fix flaky XsltFromFileExceptionTest Wait for the exchange to complete via oneExchangeDone.matchesWaitTime() before asserting mock expectations. The previous order called assertMockEndpointsSatisfied() first, which for mocks expecting zero messages returns immediately without waiting for the file consumer to process, causing intermittent failures under CI load. Co-Authored-By: Claude Opus 4.6 <[email protected]> --- .../apache/camel/component/xslt/XsltFromFileExceptionTest.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java index 74f68c9e1a3f..373fe21328de 100644 --- a/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java +++ b/core/camel-core/src/test/java/org/apache/camel/component/xslt/XsltFromFileExceptionTest.java @@ -33,10 +33,10 @@ public class XsltFromFileExceptionTest extends ContextTestSupport { template.sendBodyAndHeader(fileUri(), "<hello>world!</hello>", Exchange.FILE_NAME, "hello.xml"); - assertMockEndpointsSatisfied(); - oneExchangeDone.matchesWaitTime(); + assertMockEndpointsSatisfied(); + assertFileNotExists(testFile("hello.xml")); assertFileExists(testFile("ok/hello.xml")); } @@ -49,10 +49,10 @@ public class XsltFromFileExceptionTest extends ContextTestSupport { // the last tag is not ended properly template.sendBodyAndHeader(fileUri(), "<hello>world!</hello", Exchange.FILE_NAME, "hello2.xml"); - assertMockEndpointsSatisfied(); - oneExchangeDone.matchesWaitTime(); + assertMockEndpointsSatisfied(); + assertFileNotExists(testFile("hello2.xml")); assertFileExists(testFile("error/hello2.xml")); }
