[
https://issues.apache.org/jira/browse/CAMEL-27558?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151384#comment-18151384
]
Guillaume Nodet commented on CAMEL-27558:
-----------------------------------------
This issue is being investigated by a coding agent (on behalf of gnodet).
Analysis: The test is flaky due to an insufficient default MockEndpoint timeout
(10s). The test creates 300 files and polls them in batches of 100 with
maxMessagesPerPoll=100 and noop=true. With the early-stop listing optimization
(CAMEL-26635), each successive poll must re-list and skip already-consumed
idempotent entries before finding new files, making later polls progressively
slower. Combined with SFTP overhead, the 3rd poll often does not complete
within the default 10s window. Fix is to add mock.setResultWaitTime(30000)
before mock.assertIsSatisfied().
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> Fix flaky test MinaSftpConsumerMaxMessagesPerPollListingIT
> ----------------------------------------------------------
>
> Key: CAMEL-27558
> URL: https://issues.apache.org/jira/browse/CAMEL-27558
> Project: Camel
> Issue Type: Test
> Components: camel-mina-sftp
> Affects Versions: 4.24.0
> Reporter: Aurélien Pupier
> Assignee: Guillaume Nodet
> Priority: Major
>
> [flaky 23% of the
> time|https://develocity.apache.org/scans/tests?search.relativeStartTime=P90D&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.component.file.remote.mina.integration.MinaSftpConsumerMaxMessagesPerPollListingIT]
> {noformat}
> java.lang.AssertionError: mock://result Received message count. Expected:
> <300> but was: <160>
> at
> org.apache.camel.component.mock.MockEndpoint.fail(MockEndpoint.java:2079)
> at
> org.apache.camel.component.mock.MockEndpoint.assertEquals(MockEndpoint.java:2014)
>
> at
> org.apache.camel.component.mock.MockEndpoint.doAssertIsSatisfied(MockEndpoint.java:502)
>
> at
> org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:480)
>
> at
> org.apache.camel.component.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:470)
>
> at
> org.apache.camel.component.file.remote.mina.integration.MinaSftpConsumerMaxMessagesPerPollListingIT.consumesEveryFileOverThePolls(MinaSftpConsumerMaxMessagesPerPollListingIT.java:136)
>
> {noformat}
> the real value is between 160 and 215, most of the time 200
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)