[
https://issues.apache.org/jira/browse/CAMEL-27555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18151649#comment-18151649
]
Guillaume Nodet commented on CAMEL-27555:
-----------------------------------------
This issue is being investigated by a coding agent (on behalf of gnodet).
Root cause identified: the test asserts expectedMessageCount(6) on mock:before,
but the Artemis broker default maxDeliveryAttempts is 10 (not 6). The latch
releases at count 6, then more broker redeliveries may arrive (causing
"Expected 6 but was 8/10"), or on slow CI fewer arrive within the wait window
(causing "Expected 6 but was 5"). No assertPeriod is set to guard against late
arrivals.
Fix approach: pin Artemis maxDeliveryAttempts to 6 in the test infrastructure
AddressSettings, and add setAssertPeriod on the mock:before endpoint to verify
no extra messages arrive.
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> Fix flaky test JMSTransactionRollbackIT
> ---------------------------------------
>
> Key: CAMEL-27555
> URL: https://issues.apache.org/jira/browse/CAMEL-27555
> Project: Camel
> Issue Type: Test
> Components: camel-jms
> Reporter: Aurélien Pupier
> Assignee: Guillaume Nodet
> Priority: Major
>
> [3 failed and 16 flaky in last 90
> days|https://develocity.apache.org/scans/tests?search.relativeStartTime=P90D&search.timeZoneId=Europe%2FParis&tests.container=org.apache.camel.component.jms.integration.spring.tx.error.JMSTransactionRollbackIT]
> {noformat}
> java.lang.AssertionError: mock://before Received message count. Expected: <6>
> but was: <8>
> 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.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:269)
>
> at
> org.apache.camel.component.jms.integration.spring.tx.error.JMSTransactionRollbackIT.testTransactionRollback(JMSTransactionRollbackIT.java:42)
>
> {noformat}
> {noformat}
> java.lang.AssertionError: mock://before Received message count. Expected: <6>
> but was: <10>
> 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.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:269)
>
> at
> org.apache.camel.component.jms.integration.spring.tx.error.JMSTransactionRollbackIT.testTransactionRollback(JMSTransactionRollbackIT.java:42)
> {noformat}
> {noformat}
> java.lang.AssertionError: mock://before Received message count. Expected: <6>
> but was: <5>
> 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.mock.MockEndpoint.assertIsSatisfied(MockEndpoint.java:269)
>
> at
> org.apache.camel.component.jms.integration.spring.tx.error.JMSTransactionRollbackIT.testTransactionRollback(JMSTransactionRollbackIT.java:42)
>
> {noformat}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)