Fix testCloseOrDeleteIndexDuringSnapshot (#42007)

* This test was resulting in a `PARTIAL` instead of a `SUCCESS` state for
the case of closing an index during snapshotting on 7.x
  * The reason for this is the changed default behaviour regarding
waiting for active shards between 8.0 and 7.x
  * Fixed by adjusting the waiting behaviour on the close index request
in the test
* Closes #39828
This commit is contained in:
Armin Braun 2019-05-10 11:59:20 +02:00 committed by GitHub
parent dc444cef49
commit ea7db2bb6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -2483,7 +2483,7 @@ public class SharedClusterSnapshotRestoreIT extends AbstractSnapshotIntegTestCas
} else {
logger.info("--> close index while partial snapshot is running");
closedOnPartial = true;
client.admin().indices().prepareClose("test-idx-1").get();
client.admin().indices().prepareClose("test-idx-1").setWaitForActiveShards(ActiveShardCount.DEFAULT).get();
}
} else {
// non-partial snapshots do not allow close / delete operations on indices where snapshot has not been completed