assertBusy(new Runnable() {
@Override
public void run() {
PendingClusterTasksResponse pendingTasks = GLOBAL_CLUSTER.client().admin().cluster().preparePendingClusterTasks().setLocal(true).get();
assertThat("client " + GLOBAL_CLUSTER.client() + " still has pending tasks " +
pendingTasks.prettyPrint(), pendingTasks, Matchers.emptyIterable());
}
});
assertNoTimeout(GLOBAL_CLUSTER.client().admin().cluster().prepareHealth().setWaitForEvents(Priority.LANGUID).get());
}
}