use of org.ovirt.engine.core.common.scheduling.PerHostMessages in project ovirt-engine by oVirt.
the class VmToHostAffinityFilterPolicyUnitTest method testNegativeAffinity.
@Test
public void testNegativeAffinity() throws Exception {
hosts = Arrays.asList(host_negative_enforcing, host_not_in_affinity_group);
List<AffinityGroup> affinityGroups = Arrays.asList(negative_enforcing_group);
doReturn(affinityGroups).when(affinityGroupDao).getAllAffinityGroupsByVmId(any());
assertThat(unit.filter(cluster, hosts, vm, new HashMap<>(), new PerHostMessages())).contains(host_not_in_affinity_group);
}
Aggregations