Skip to content

Commit

Permalink
Fix TasksIT.testTasksUnblocking (#95584)
Browse files Browse the repository at this point in the history
* Fix TasksIT.testTasksUnblocking

Due to #94865, we now send an ack before the task gets removed, so we can see
a non-zero amount of tasks in the task manager for a short amount of time.

We can just busy wait until the task gets removed.

See #95494, #94987
  • Loading branch information
arteam authored May 9, 2023
1 parent a3b2c03 commit 9ab91e2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -532,7 +532,12 @@ public void testTasksUnblocking() throws Exception {
new TestTaskPlugin.UnblockTestTasksRequestBuilder(client(), TestTaskPlugin.UnblockTestTasksAction.INSTANCE).get();

future.get();
assertEquals(0, clusterAdmin().prepareListTasks().setActions(TestTaskPlugin.TestTaskAction.NAME + "[n]").get().getTasks().size());
assertBusy(
() -> assertEquals(
0,
clusterAdmin().prepareListTasks().setActions(TestTaskPlugin.TestTaskAction.NAME + "[n]").get().getTasks().size()
)
);
}

public void testListTasksWaitForCompletion() throws Exception {
Expand Down

0 comments on commit 9ab91e2

Please sign in to comment.