Moti Asayag has posted comments on this change. Change subject: engine: Add vnic profile and network caching to validator ......................................................................
Patch Set 2: (2 comments) http://gerrit.ovirt.org/#/c/32600/2/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/NetworkHelper.java File backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/network/cluster/NetworkHelper.java: Line 72: profile.setPortMirroring(false); Line 73: return profile; Line 74: } Line 75: Line 76: public static Network getNetworkByVnicProfileId(Guid vnicProfileId) { lines 76-81 can be replaced with the new method from line 85: getVnicProfile(Guid vnicProfileId) need to consider the possibility or a returned null value. Line 77: if (vnicProfileId == null) { Line 78: return null; Line 79: } Line 80: http://gerrit.ovirt.org/#/c/32600/2/backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/VmNicValidatorTest.java File backend/manager/modules/bll/src/test/java/org/ovirt/engine/core/bll/validator/VmNicValidatorTest.java: Line 212: Line 213: assertThat(validator.profileValid(OTHER_GUID), matcher); Line 214: Line 215: verify(nic, atLeastOnce()).getVnicProfileId(); Line 216: verify(validator).loadVnicProfile(VNIC_PROFILE_ID); wouldn't you like to verify lazy init method actually being invoked exactly once ? Line 217: if (networkExists) { Line 218: verify(validator).getNetworkByVnicProfile(vnicProfile); Line 219: verify(validator).isNetworkInCluster(network, OTHER_GUID); Line 220: } -- To view, visit http://gerrit.ovirt.org/32600 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ibeaa7af2ac76433ed832ff65514201ece6049478 Gerrit-PatchSet: 2 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Yevgeny Zaspitsky <[email protected]> Gerrit-Reviewer: Alona Kaplan <[email protected]> Gerrit-Reviewer: Lior Vernia <[email protected]> Gerrit-Reviewer: Moti Asayag <[email protected]> Gerrit-Reviewer: Yevgeny Zaspitsky <[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
