Martin Mucha has posted comments on this change. Change subject: core: pool per DC ......................................................................
Patch Set 35: (2 comments) answers. http://gerrit.ovirt.org/#/c/26799/35/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/MacPoolPerDcTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/network/MacPoolPerDcTest.java: Line 34: import org.ovirt.engine.core.dao.VmDAO; Line 35: import org.ovirt.engine.core.dao.network.VmNicDao; Line 36: import org.ovirt.engine.core.utils.MockConfigRule; Line 37: Line 38: public class MacPoolPerDcTest { > The tests are very cumbersome and hard to understand, please make an effort - Try to initialize twice — do you request verifying logging or "not failing" is sufficient? each public method should be tested — done. Get existing pool by DC ID — done. Get existing pool for VM (by instance) — method removed. Get existing pool for VM (by instance) where the dc ID is not set on the VM — method removed. Get non-existing pool for VM (by instance) — method removed. Get existing pool for VM (by ID) — method removed. Get non-existing pool for VM (by ID) — method removed. Create a pool — done. Try to create a pool that's already registered — o you request verifying logging or "not failing" is sufficient? Modify an existing pool — done Try to modify a pool that isn't registered — done Delete an existing pool — done Try to delete a pool that isn't registered —done Line 39: Line 40: public static final int MAX_MACS_COUNT_IN_POOL = 100000; Line 41: public static final boolean ALLOW_DUPLICATES = false; Line 42: public static final String MAC_POOL_RANGES = "00:1a:4a:15:c0:00-00:1a:4a:15:c0:ff"; Line 206: errorCollector.checkThat("provided mac should be used in returned pool", MacPoolPerDc.INSTANCE.poolForVmNic(vmNic2).isMacInUse(macAddress2), is(true)); Line 207: } Line 208: Line 209: @Test Line 210: public void testCanRemovePoolWhichIsNotInUse() throws Exception { > MacPoolPerDc.removePool() just removes it from the internal map in memory a removed. Line 211: //mock data center Line 212: final MacPool macPool1 = createMacPool("00:1a:4a:15:c0:00", "00:1a:4a:15:c0:09"); Line 213: final StoragePool storagePool1 = createStoragePool(macPool1); Line 214: -- To view, visit http://gerrit.ovirt.org/26799 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: If522a0b0d5f810281bed010b46b5242f7dbdcc29 Gerrit-PatchSet: 35 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Martin Mucha <[email protected]> Gerrit-Reviewer: Martin Mucha <[email protected]> Gerrit-Reviewer: Mike Kolesnik <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: [email protected] Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list [email protected] http://lists.ovirt.org/mailman/listinfo/engine-patches
