jbonofre opened a new pull request, #2625:
URL: https://github.com/apache/activemq/pull/2625

   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.


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact


Reply via email to