CCR: Test follow on top of closed index (#54956)

Added testing of following on top of a closed index.
This could for instance be the old leader index in
cases where leader and follower clusters have been
swapped.
This commit is contained in:
Henning Andersen 2020-04-15 18:37:17 +02:00 committed by Henning Andersen
parent b5974f3d41
commit b3eb57a094
1 changed files with 3 additions and 0 deletions

View File

@ -1294,6 +1294,9 @@ public class IndexFollowingIT extends CcrIntegTestCase {
followerClient().admin().indices().prepareClose("index2").get();
pauseFollow("index2");
if (randomBoolean()) {
assertAcked(followerClient().execute(UnfollowAction.INSTANCE, new UnfollowAction.Request("index2")).actionGet());
}
final PutFollowAction.Request followRequest2 = putFollow("index1", "index2");
PutFollowAction.Response response2 = followerClient().execute(PutFollowAction.INSTANCE, followRequest2).get();