Fix test bug in ClusterServiceIT#testClusterStateBatchedUpdates
This commit fixes a test bug in ClusterService#testClusterStateBatchedUpdates. In particular, in the case that an executor did not receive a task assignment from the random assignments, it would not have an entry in the map of executors to counts of assigned tasks. The fix is to just check if each executor has an entry in the counts map.
This commit is contained in:
parent
3ab7451ca5
commit
e7952e2023
|
@ -836,7 +836,9 @@ public class ClusterServiceIT extends ESIntegTestCase {
|
||||||
|
|
||||||
// assert each executor executed the correct number of tasks
|
// assert each executor executed the correct number of tasks
|
||||||
for (TaskExecutor executor : executors) {
|
for (TaskExecutor executor : executors) {
|
||||||
assertEquals((int)counts.get(executor), executor.counter.get());
|
if (counts.containsKey(executor)) {
|
||||||
|
assertEquals((int) counts.get(executor), executor.counter.get());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// assert the correct number of clusterStateProcessed events were triggered
|
// assert the correct number of clusterStateProcessed events were triggered
|
||||||
|
|
Loading…
Reference in New Issue