Mike Kolesnik has posted comments on this change. Change subject: core: pool per DC ......................................................................
Patch Set 37: (2 comments) http://gerrit.ovirt.org/#/c/26799/37/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 36: Line 37: @Rule Line 38: public ErrorCollector errorCollector = new ErrorCollector(); Line 39: private MacPool macPoolA; Line 40: private StoragePool storagePoolA; > great. So lets forget about 'logic' and talk about clean coding: So this is not fine then? Car toyota; Also Mock specifier is not necessary because in *unit test* context you test a specific class, all other data that you use is some sort of test data (mock or actual value). So it's actually redundant. Line 41: private VmNic vmNicA; Line 42: Line 43: @Before Line 44: public void setUp() throws Exception { Line 126: pool.initialize(); Line 127: Line 128: macPoolA.setAllowDuplicateMacAddresses(true); Line 129: pool.modifyPool(macPoolA); Line 130: //should not fail. > - ad duplicity: done OK then start with range that has just one mac (i.e. 00:00:00:00:00:01-00:00:00:00:00:01) and allocate and 2nd allocation should fail. Thne update to have another range that could have one or more macs (i.e. 00:00:00:00:ff:ff-00:00:00:00:ff:ff) and see that when you now allocate new MAC you get the new one. Line 131: } Line 132: Line 133: @Test Line 134: public void testModifyOfNotExistingMacPool() throws Exception { -- 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: 37 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
