Skip to content

Commit eadc311

Browse files
Fix testSnapshotClosedIndex in 7.3 (#44759)
* We have to wait for the shards before closing. This was fixed in line with some other work in 7.4 but never backported to 7.3 * Closes #44750
1 parent 6ed6c4a commit eadc311

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

server/src/test/java/org/elasticsearch/snapshots/SharedClusterSnapshotRestoreIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1569,7 +1569,7 @@ public void testSnapshotClosedIndex() throws Exception {
15691569
createIndex("test-idx", "test-idx-closed");
15701570
ensureGreen();
15711571
logger.info("--> closing index test-idx-closed");
1572-
assertAcked(client.admin().indices().prepareClose("test-idx-closed"));
1572+
assertAcked(client.admin().indices().prepareClose("test-idx-closed").setWaitForActiveShards(ActiveShardCount.ALL));
15731573
ClusterStateResponse stateResponse = client.admin().cluster().prepareState().get();
15741574
assertThat(stateResponse.getState().metaData().index("test-idx-closed").getState(), equalTo(IndexMetaData.State.CLOSE));
15751575
assertThat(stateResponse.getState().routingTable().index("test-idx-closed"), notNullValue());

0 commit comments

Comments
 (0)