Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make
NodeConnectionsService#connectToNodes
deterministic
Today the `CoordinatorTests` test suite is not totally deterministic because its behaviour depends on the iteration order of the JDK's unordered collections which are not under the control of our test seed. This commit makes `NodeConnectionsService#connectToNodes` iterate through the nodes using `DiscoveryNodes#mastersFirstStream`, which is made deterministic by elastic#94948. It's an ugly hack to do some extra work in production just for the sake of tests, but we're only sorting at most a few hundred elements here so it's not a huge deal. Relates elastic#94946
- Loading branch information