Skip to content

Commit

Permalink
Fix testCloseOrDeleteIndexDuringSnapshot (#42007)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
original-brownbear authored May 10, 2019
1 parent dc444ce commit ea7db2b
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2483,7 +2483,7 @@ public void testCloseOrDeleteIndexDuringSnapshot() throws Exception {
} 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
Expand Down

0 comments on commit ea7db2b

Please sign in to comment.