use of org.ovirt.engine.core.common.businessentities.gluster.TransportType in project ovirt-engine by oVirt.
the class GlusterVolumeDaoTest method testRemoveTransportTypes.
@Test
public void testRemoveTransportTypes() {
Set<TransportType> transportTypes = existingReplVol.getTransportTypes();
assertEquals(2, transportTypes.size());
assertTrue(transportTypes.contains(TransportType.TCP));
assertTrue(transportTypes.contains(TransportType.RDMA));
List<TransportType> types = new ArrayList<>();
types.add(TransportType.TCP);
types.add(TransportType.RDMA);
dao.removeTransportTypes(EXISTING_VOL_REPL_ID, types);
GlusterVolumeEntity volumeAfter = dao.getById(EXISTING_VOL_REPL_ID);
assertNotNull(volumeAfter);
transportTypes = volumeAfter.getTransportTypes();
assertEquals(0, transportTypes.size());
assertFalse(transportTypes.contains(TransportType.TCP));
assertFalse(transportTypes.contains(TransportType.RDMA));
assertFalse(volumeAfter.equals(existingReplVol));
existingReplVol.removeTransportType(TransportType.TCP);
existingReplVol.removeTransportType(TransportType.RDMA);
assertEquals(volumeAfter, existingReplVol);
}
Aggregations