You are viewing a plain text version of this content. The canonical link for it is here.
Posted to gitbox@activemq.apache.org by "jbonofre (via GitHub)" <gi...@apache.org> on 2026/09/29 15:40:29 UTC
[PR] [6.3.x] Fix flaky TwoBrokerVirtualTopicSelectorAwareForwardingTest (link #2238) [activemq]
jbonofre opened a new pull request, #2626:
URL: https://github.com/apache/activemq/pull/2626
Backport of #2625 to activemq-6.3.x.
Link to #2238
### Root Cause
In `TwoBrokerVirtualTopicSelectorAwareForwardingTest`, duplex network connectors are configured between BrokerA and BrokerB (`bridge.setDuplex(true)` on BrokerA). The base `waitForBridgeFormation()` only checks brokers that contain a `NetworkConnector` in `broker.getNetworkConnectors()`, which only BrokerA has. As a result, `waitForBridgeFormation()` returns as soon as BrokerA has an active bridge, while BrokerB's reverse duplex bridge and advisory subscriptions are still asynchronously establishing.
When the test creates consumers on BrokerB immediately after `waitForBridgeFormation()`, consumer advisories are emitted before the bridge forwarder is listening on BrokerB. Because advisory messages are non-persistent and non-durable, they are dropped, and BrokerA never receives the advisory, causing tests such as `testSelectorAwareForwarding` to fail at line 440 waiting for advisory propagation.
Additionally:
- When BrokerA was stopped and restarted in `testSelectorAwareForwarding`, `waitForBridgeFormation()` was not called before checking advisory propagation.
- Advisory propagation wait timeouts were 15 seconds, which could be tight on busy or resource-constrained CI runners.
### Changes
1. Override `waitForBridgeFormation()` in `TwoBrokerVirtualTopicSelectorAwareForwardingTest` to verify that the reverse bridge from BrokerB to BrokerA is established (`waitForBridge("BrokerB", "BrokerA", ...)`) and advisory subscriptions are active in topic regions (`waitForMinTopicRegionConsumerCount`).
2. Invoke `waitForBridgeFormation()` after restarting BrokerA in `testSelectorAwareForwarding`.
3. Increase advisory propagation wait timeouts from 15s to 30s.
Clean cherry-pick of #2625.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact
Re: [PR] [6.3.x] Fix flaky TwoBrokerVirtualTopicSelectorAwareForwardingTest (link #2238) [activemq]
Posted by "jbonofre (via GitHub)" <gi...@apache.org>.
jbonofre merged PR #2626:
URL: https://github.com/apache/activemq/pull/2626
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: gitbox-unsubscribe@activemq.apache.org
For additional commands, e-mail: gitbox-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact