Skip to content

Fix flaky AMQ6133PersistJMSRedeliveryTest#1872

Open
gurpartap3697 wants to merge 1 commit intoapache:mainfrom
gurpartap3697:fix/AMQ6133PersistJMSRedeliveryTest
Open

Fix flaky AMQ6133PersistJMSRedeliveryTest#1872
gurpartap3697 wants to merge 1 commit intoapache:mainfrom
gurpartap3697:fix/AMQ6133PersistJMSRedeliveryTest

Conversation

@gurpartap3697
Copy link
Copy Markdown
Contributor

Description:

This PR addresses intermittent test failures in AMQ6133PersistJMSRedeliveryTest caused by a java.lang.reflect.UndeclaredThrowableException

Error:  Errors: 
Error:    AMQ6133PersistJMSRedeliveryTest.testPersistJMSRedeliveredMessageLossOnIndexRebuild:92 » UndeclaredThrowable

ref: https://github.com/apache/activemq/actions/runs/23891160188/job/69665187032

The test was attempting to assert the queue size via JMX immediately after restarting the broker. Because the JMX MBean for the destination is registered asynchronously, the test queried the broker before the MBean was available, causing the InstanceNotFoundException.

Added Wait.waitFor to poll the JMX proxy. The condition includes a try-catch block that suppresses InstanceNotFoundException, allowing the test to wait until the MBean is successfully registered and the queue size matches the expected value.

@jbonofre jbonofre self-requested a review April 3, 2026 12:38
Copy link
Copy Markdown
Member

@jbonofre jbonofre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants