[ 
https://issues.apache.org/jira/browse/CAMEL-24026?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18097543#comment-18097543
 ] 

Aurélien Pupier commented on CAMEL-24026:
-----------------------------------------

current stacktraces:
{noformat}
org.opentest4j.AssertionFailedError: Exchange should have completed ==> 
expected: <true> but was: <false>
        at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:232)
        at 
org.apache.camel.component.xslt.XsltFromFileExceptionTest.testXsltFromFileExceptionOk(XsltFromFileExceptionTest.java:39)
{noformat}

{noformat}
org.opentest4j.AssertionFailedError: Exchange should have completed ==> 
expected: <true> but was: <false>
        at org.junit.jupiter.api.Assertions.assertTrue(Assertions.java:232)
        at 
org.apache.camel.component.xslt.XsltFromFileExceptionTest.testXsltFromFileExceptionFail(XsltFromFileExceptionTest.java:56)
{noformat}

> Fix flaky XsltFromFileExceptionTest
> -----------------------------------
>
>                 Key: CAMEL-24026
>                 URL: https://issues.apache.org/jira/browse/CAMEL-24026
>             Project: Camel
>          Issue Type: Test
>          Components: camel-core
>            Reporter: Guillaume Nodet
>            Assignee: Aurélien Pupier
>            Priority: Major
>             Fix For: 4.22.0
>
>
> The XsltFromFileExceptionTest is flaky because it calls 
> assertMockEndpointsSatisfied() before waiting for the file consumer to pick 
> up and process the file. The oneExchangeDone latch must be awaited BEFORE 
> asserting mock expectations, otherwise the mock assertion can time out on 
> slow CI because the file has not been consumed yet.
> Fix: reorder the assertions to wait for oneExchangeDone first, then assert 
> mocks, then check file positions.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to