Skip to content

Commit

Permalink
[TEST] Pause index following at end of test,
Browse files Browse the repository at this point in the history
so that no unexpected failures happen at test teardown.
  • Loading branch information
martijnvg committed Dec 17, 2018
1 parent 149ca9c commit 3a4fb89
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
import org.elasticsearch.persistent.PersistentTasksCustomMetaData;
import org.elasticsearch.xpack.CcrSingleNodeTestCase;
import org.elasticsearch.xpack.core.ccr.action.FollowStatsAction;
import org.elasticsearch.xpack.core.ccr.action.PauseFollowAction;
import org.elasticsearch.xpack.core.ccr.action.PutFollowAction;

import java.util.Comparator;
Expand Down Expand Up @@ -102,6 +103,9 @@ public void testFollowStatsApiFollowerIndexFiltering() throws Exception {
response.getStatsResponses().sort(Comparator.comparing(o -> o.status().followerIndex()));
assertThat(response.getStatsResponses().get(0).status().followerIndex(), equalTo("follower1"));
assertThat(response.getStatsResponses().get(1).status().followerIndex(), equalTo("follower2"));

assertAcked(client().execute(PauseFollowAction.INSTANCE, new PauseFollowAction.Request("follower1")).actionGet());
assertAcked(client().execute(PauseFollowAction.INSTANCE, new PauseFollowAction.Request("follower2")).actionGet());
}

}

0 comments on commit 3a4fb89

Please sign in to comment.