lizhimins opened a new pull request, #11008:
URL: https://github.com/apache/rocketmq/pull/11008

   ### Which Issue(s) This PR Fixes
   
   - Fixes #11007
   
   ### Brief Description
   
   `CreateAndUpdateTopicIT` is flaky in the CI integration pipeline. The topic 
route-size assertions (`hasSize(3)`) run immediately after topic creation / 
broker registration, but broker -> NameServer route propagation is 
asynchronous. Under CI load the NameServer route table may not be fully updated 
when the assertion executes, intermittently producing `Expected size: 3 but 
was: 2`.
   
   This PR wraps those route-size assertions in `awaitility` polling 
(`await().atMost(30, TimeUnit.SECONDS).untilAsserted(...)`), so each assertion 
waits for the route to propagate before checking. This is consistent with the 
awaitility pattern already used in 
`testDeleteTopicFromNameSrvWithBrokerRegistration` in the same class.
   
   Tests updated:
   - `testCreateOrUpdateTopic_EnableSingleTopicRegistration`
   - `testStaticTopicNotAffected`
   - `testCreateOrUpdateTopic_EnableSplitRegistration`
   
   No production code is changed; this is a test-stability fix only.
   
   ### How Did You Test This Change?
   
   The failing assertion was observed on CI run 
[33726673235](https://github.com/apache/rocketmq/actions/runs/33726673235/job/100557097336)
 of an unrelated PR (#11001). The change converts the immediate assertions into 
bounded awaitility polling, removing the race. The integration test relies on 
the existing awaitility dependency already used in this class, and the module 
compiles cleanly.
   


-- 
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]

Reply via email to