|
82 | 82 | import org.elasticsearch.xpack.core.XPackSettings;
|
83 | 83 | import org.elasticsearch.xpack.core.ccr.AutoFollowMetadata;
|
84 | 84 | import org.elasticsearch.xpack.core.ccr.ShardFollowNodeTaskStatus;
|
| 85 | +import org.elasticsearch.xpack.core.ccr.action.CcrStatsAction; |
85 | 86 | import org.elasticsearch.xpack.core.ccr.action.FollowStatsAction;
|
86 | 87 | import org.elasticsearch.xpack.core.ccr.action.PauseFollowAction;
|
87 | 88 | import org.elasticsearch.xpack.core.ccr.action.PutFollowAction;
|
@@ -380,13 +381,18 @@ protected void ensureEmptyWriteBuffers() throws Exception {
|
380 | 381 | protected void pauseFollow(String... indices) throws Exception {
|
381 | 382 | for (String index : indices) {
|
382 | 383 | final PauseFollowAction.Request unfollowRequest = new PauseFollowAction.Request(index);
|
383 |
| - followerClient().execute(PauseFollowAction.INSTANCE, unfollowRequest).get(); |
| 384 | + assertAcked(followerClient().execute(PauseFollowAction.INSTANCE, unfollowRequest).actionGet()); |
384 | 385 | }
|
385 | 386 | ensureNoCcrTasks();
|
386 | 387 | }
|
387 | 388 |
|
388 | 389 | protected void ensureNoCcrTasks() throws Exception {
|
389 | 390 | assertBusy(() -> {
|
| 391 | + CcrStatsAction.Response statsResponse = |
| 392 | + followerClient().execute(CcrStatsAction.INSTANCE, new CcrStatsAction.Request()).actionGet(); |
| 393 | + assertThat("Follow stats not empty: " + Strings.toString(statsResponse.getFollowStats()), |
| 394 | + statsResponse.getFollowStats().getStatsResponses(), empty()); |
| 395 | + |
390 | 396 | final ClusterState clusterState = followerClient().admin().cluster().prepareState().get().getState();
|
391 | 397 | final PersistentTasksCustomMetaData tasks = clusterState.getMetaData().custom(PersistentTasksCustomMetaData.TYPE);
|
392 | 398 | assertThat(tasks.tasks(), empty());
|
|
0 commit comments