mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-17 10:25:15 +00:00
Test: wait for the cluster to recover in ClusterServiceTests before waiting for update state task results
On CI machines node recovery sometimes takes up to 2 seconds. When it happens an update cluster state task gets stuck behind the recovery and tests fail with 1 second timeout. This commit makes sure that we wait for recovery to complete before starting the clock.
This commit is contained in:
parent
f735baf306
commit
9b75d3ef98
@ -176,6 +176,7 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
|
||||
}
|
||||
});
|
||||
|
||||
ensureGreen();
|
||||
assertThat(latch.await(1, TimeUnit.SECONDS), equalTo(true));
|
||||
|
||||
assertThat(allNodesAcked.get(), equalTo(true));
|
||||
@ -247,6 +248,7 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
|
||||
}
|
||||
});
|
||||
|
||||
ensureGreen();
|
||||
assertThat(latch.await(1, TimeUnit.SECONDS), equalTo(true));
|
||||
|
||||
assertThat(allNodesAcked.get(), equalTo(true));
|
||||
@ -373,6 +375,7 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
|
||||
}
|
||||
});
|
||||
|
||||
ensureGreen();
|
||||
assertThat(latch.await(1, TimeUnit.SECONDS), equalTo(true));
|
||||
|
||||
assertThat(allNodesAcked.get(), equalTo(true));
|
||||
@ -447,6 +450,7 @@ public class ClusterServiceTests extends ElasticsearchIntegrationTest {
|
||||
}
|
||||
});
|
||||
|
||||
ensureGreen();
|
||||
assertThat(latch.await(1, TimeUnit.SECONDS), equalTo(true));
|
||||
|
||||
assertThat(allNodesAcked.get(), equalTo(false));
|
||||
|
Loading…
x
Reference in New Issue
Block a user