Skip to content

Commit

Permalink
Make sure the task gets unblocked
Browse files Browse the repository at this point in the history
  • Loading branch information
arteam committed May 28, 2024
1 parent a61e9c9 commit f235b87
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down

0 comments on commit f235b87

Please sign in to comment.