mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-25 22:36:20 +00:00
[TEST] use higher timeout to wait for balanced cluster
CorruptFileTest sometimes hits conditions where lots of rebalancing happens. In such a case the default timeout is just not enough - this timeout just makes sure that the cluster has enough time to balance itself.
This commit is contained in:
parent
0bd774423d
commit
70bd24ed14
@ -136,7 +136,9 @@ public class CorruptedFileTest extends ElasticsearchIntegrationTest {
|
||||
Settings build = ImmutableSettings.builder().put(IndexMetaData.SETTING_NUMBER_OF_REPLICAS, "2").build();
|
||||
client().admin().indices().prepareUpdateSettings("test").setSettings(build).get();
|
||||
ClusterHealthResponse health = client().admin().cluster()
|
||||
.health(Requests.clusterHealthRequest("test").waitForGreenStatus().waitForRelocatingShards(0)).actionGet();
|
||||
.health(Requests.clusterHealthRequest("test").waitForGreenStatus()
|
||||
.timeout("5m") // sometimes due to cluster rebalacing and random settings default timeout is just not enough.
|
||||
.waitForRelocatingShards(0)).actionGet();
|
||||
if (health.isTimedOut()) {
|
||||
logger.info("cluster state:\n{}\n{}", client().admin().cluster().prepareState().get().getState().prettyPrint(), client().admin().cluster().preparePendingClusterTasks().get().prettyPrint());
|
||||
assertThat("timed out waiting for green state", health.isTimedOut(), equalTo(false));
|
||||
|
Loading…
x
Reference in New Issue
Block a user