diff --git a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TransportTasksActionTests.java b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TransportTasksActionTests.java index 8e14d97a16c..8d7b38f5497 100644 --- a/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TransportTasksActionTests.java +++ b/server/src/test/java/org/elasticsearch/action/admin/cluster/node/tasks/TransportTasksActionTests.java @@ -67,6 +67,7 @@ import java.util.concurrent.CountDownLatch; import java.util.concurrent.ExecutionException; import java.util.concurrent.TimeUnit; import java.util.concurrent.atomic.AtomicReference; +import java.util.stream.Collectors; import static org.elasticsearch.action.support.PlainActionFuture.newFuture; import static org.hamcrest.Matchers.containsString; @@ -307,6 +308,9 @@ public class TransportTasksActionTests extends TaskManagerTestCase { // Check task counts using taskManager Map localTasks = testNodes[0].transportService.getTaskManager().getTasks(); + logger.info("local tasks [{}]", localTasks.values().stream() + .map(t -> Strings.toString(t.taskInfo(testNodes[0].getNodeId(), true))) + .collect(Collectors.joining(","))); assertEquals(2, localTasks.size()); // all node tasks + 1 coordinating task Task coordinatingTask = localTasks.get(Collections.min(localTasks.keySet())); Task subTask = localTasks.get(Collections.max(localTasks.keySet()));