[
https://issues.apache.org/jira/browse/RATIS-2442?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Tsz-wo Sze resolved RATIS-2442.
-------------------------------
Fix Version/s: 3.3.0
Resolution: Fixed
The pull request is now merged. Thanks, [~abhishek.pal]!
> Fix flakiness for testChangeListenerToFollower
> ----------------------------------------------
>
> Key: RATIS-2442
> URL: https://issues.apache.org/jira/browse/RATIS-2442
> Project: Ratis
> Issue Type: Improvement
> Components: test
> Reporter: Abhishek Pal
> Assignee: Abhishek Pal
> Priority: Major
> Fix For: 3.3.0
>
> Time Spent: 50m
> Remaining Estimate: 0h
>
> Sometimes 'testChangeListenerToFollower' checks for the listener role too
> early.
> *setConfiguration()* returns once the reconfiguration is committed, but the
> listener node flips to follower later when the config entry is applied.
> The example scenario is as follows:
> - client gets *setConfiguration()* success
> - leader’s conf already shows no listeners
> - the old listener may still be counted as a listener for a moment
> - *cluster.getListeners()* can still return *1* due to this
> The fix is to wait for the new configuration to settle before asserting on
> cluster.getListeners().
> We can follow the other reconfiguration tests and use
> *RaftServerTestUtil.waitAndCheckNewConf()* to wait.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)