test: improved assertion

Original commit: elastic/x-pack-elasticsearch@8361d2e27d
This commit is contained in:
Martijn van Groningen 2017-04-25 12:16:01 +02:00
parent a3e7c65ba4
commit 415d40e6fc
1 changed files with 1 additions and 1 deletions

View File

@ -137,7 +137,7 @@ public class MlDistributedFailureIT extends BaseMlIntegTestCase {
ClusterState clusterState = client().admin().cluster().prepareState().get().getState(); ClusterState clusterState = client().admin().cluster().prepareState().get().getState();
PersistentTasksCustomMetaData tasks = clusterState.metaData().custom(PersistentTasksCustomMetaData.TYPE); PersistentTasksCustomMetaData tasks = clusterState.metaData().custom(PersistentTasksCustomMetaData.TYPE);
assertNotNull(tasks); assertNotNull(tasks);
assertEquals(2, tasks.taskMap().size()); assertEquals("Expected 2 tasks, but got [" + tasks.taskMap() + "]", 2, tasks.taskMap().size());
for (PersistentTask<?> task : tasks.tasks()) { for (PersistentTask<?> task : tasks.tasks()) {
assertFalse(task.needsReassignment(clusterState.nodes())); assertFalse(task.needsReassignment(clusterState.nodes()));
} }