Yevgeny Zaspitsky 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: Done 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 I do. Look a verify method implementation. Using that with a single parameter same as passing times(1) in the second one. 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 <yzasp...@redhat.com> Gerrit-Reviewer: Alona Kaplan <alkap...@redhat.com> Gerrit-Reviewer: Lior Vernia <lver...@redhat.com> Gerrit-Reviewer: Moti Asayag <masa...@redhat.com> Gerrit-Reviewer: Yevgeny Zaspitsky <yzasp...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ Engine-patches mailing list Engine-patches@ovirt.org http://lists.ovirt.org/mailman/listinfo/engine-patches