Skip to content

Commit 405ff61

Browse files
committed
[TEST] Pause index following at end of test,
so that no unexpected failures happen at test teardown.
1 parent bbb6846 commit 405ff61

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

x-pack/plugin/ccr/src/test/java/org/elasticsearch/xpack/ccr/action/FollowStatsIT.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
import org.elasticsearch.persistent.PersistentTasksCustomMetaData;
1515
import org.elasticsearch.xpack.CcrSingleNodeTestCase;
1616
import org.elasticsearch.xpack.core.ccr.action.FollowStatsAction;
17+
import org.elasticsearch.xpack.core.ccr.action.PauseFollowAction;
1718
import org.elasticsearch.xpack.core.ccr.action.PutFollowAction;
1819

1920
import java.util.Comparator;
@@ -102,6 +103,9 @@ public void testFollowStatsApiFollowerIndexFiltering() throws Exception {
102103
response.getStatsResponses().sort(Comparator.comparing(o -> o.status().followerIndex()));
103104
assertThat(response.getStatsResponses().get(0).status().followerIndex(), equalTo("follower1"));
104105
assertThat(response.getStatsResponses().get(1).status().followerIndex(), equalTo("follower2"));
106+
107+
assertAcked(client().execute(PauseFollowAction.INSTANCE, new PauseFollowAction.Request("follower1")).actionGet());
108+
assertAcked(client().execute(PauseFollowAction.INSTANCE, new PauseFollowAction.Request("follower2")).actionGet());
105109
}
106110

107111
}

0 commit comments

Comments
 (0)