From b3eb57a0941646e6c91a622fd97af86e5a2f1f70 Mon Sep 17 00:00:00 2001 From: Henning Andersen <33268011+henningandersen@users.noreply.github.com> Date: Wed, 15 Apr 2020 18:37:17 +0200 Subject: [PATCH] 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. --- .../java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java index bac71b7ffbf..6d57a02966d 100644 --- a/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java +++ b/x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/IndexFollowingIT.java @@ -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();