parent
d2aced810d
commit
6e025c12f0
|
@ -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<Long, Task> 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()));
|
||||
|
|
Loading…
Reference in New Issue