[TEST] Pause index following at end of test,

so that no unexpected failures happen at test teardown.
This commit is contained in:
Martijn van Groningen 2018-12-17 07:55:27 +01:00
parent 2028c2af14
commit f27d2c2927
No known key found for this signature in database
GPG Key ID: AB236F4FCF2AF12A
1 changed files with 4 additions and 0 deletions

View File

@ -14,6 +14,7 @@ import org.elasticsearch.index.IndexSettings;
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;
@ -102,6 +103,9 @@ public class FollowStatsIT extends CcrSingleNodeTestCase {
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());
}
}