diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java index 63629e16974d5..2b25a9ab59ce1 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java +++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TestTaskPlugin.java @@ -300,12 +300,13 @@ protected NodeResponse nodeOperation(NodeRequest request, Task task) { logger.info("Test task started on the node {}", clusterService.localNode()); if (request.shouldBlock) { try { - waitUntil(() -> { + boolean unblocked = waitUntil(() -> { if (((CancellableTask) task).isCancelled()) { throw new RuntimeException("Cancelled!"); } return ((TestTask) task).isBlocked() == false; }); + assert unblocked : task + " hasn't been unblocked"; } catch (InterruptedException ex) { Thread.currentThread().interrupt(); }