Skip to content

Commit e762281

Browse files
committed
Fix test
1 parent 6f2495f commit e762281

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

server/src/test/java/org/elasticsearch/indices/settings/UpdateNumberOfReplicasIT.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,9 @@ public void testSimpleUpdateNumberOfReplicas() throws Exception {
9191
logger.info("starting another node to new replicas will be allocated to it");
9292
allowNodes("test", 3);
9393

94+
final long afterStartingAnotherNodeVersion =
95+
client().admin().cluster().prepareState().get().getState().metaData().index("test").getSettingsVersion();
96+
mit -
9497
logger.info("Running Cluster Health");
9598
clusterHealth = client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).setWaitForGreenStatus().setWaitForNoRelocatingShards(true).setWaitForNodes(">=3").execute().actionGet();
9699
logger.info("Done Cluster Health, status {}", clusterHealth.getStatus());
@@ -125,7 +128,7 @@ public void testSimpleUpdateNumberOfReplicas() throws Exception {
125128

126129
final long afterReplicaDecreaseSettingsVersion =
127130
client().admin().cluster().prepareState().get().getState().metaData().index("test").getSettingsVersion();
128-
assertThat(afterReplicaDecreaseSettingsVersion, equalTo(1 + afterReplicaIncreaseSettingsVersion));
131+
assertThat(afterReplicaDecreaseSettingsVersion, equalTo(1 + afterStartingAnotherNodeVersion));
129132
}
130133

131134
public void testAutoExpandNumberOfReplicas0ToData() throws IOException {

0 commit comments

Comments
 (0)