[TEST] testAckedIndexing waits for the cluster state to have propogated

to all nodes in the cluster before checking the existance of documents
on each node
This commit is contained in:
Ali Beyad 2017-01-17 15:35:14 -05:00
parent 1169cd936e
commit ce811feba7
1 changed files with 10 additions and 0 deletions

View File

@ -584,6 +584,16 @@ public class DiscoveryWithServiceDisruptionsIT extends ESIntegTestCase {
}
ensureGreen("test");
// make sure all nodes have the updated cluster state with the latest routing table
final long clusterStateVersionOnMaster = internalCluster().clusterService(internalCluster().getMasterName())
.state().getVersion();
assertBusy(() -> {
for (String node : nodes) {
assertThat(internalCluster().clusterService(node).state().getVersion(),
greaterThanOrEqualTo(clusterStateVersionOnMaster));
}
});
logger.info("validating successful docs");
for (String node : nodes) {
try {