Milan Zamazal has posted comments on this change. Change subject: virt: vm: Update time on VM after resume ......................................................................
Patch Set 3: (1 comment) https://gerrit.ovirt.org/#/c/48860/3/vdsm/virt/vm.py File vdsm/virt/vm.py: Line 1190: finally: Line 1191: if not guestCpuLocked: Line 1192: self._guestCpuLock.release() Line 1193: Line 1194: def _setTime(self): > this is good, but let's do the final mile: > - let's rename this to something more intent-revealing, like 'resyncTime' Done. > - let's add a docstring. Done. > - let's make this public, so we can have one simple test in vmTests.py Making a method public means encouraging its use outside the class. Doing so just for tests doesn't look like a good idea to me, even when it's stated in the docstring. I can't see a problem in calling non-public methods from tests -- if the method changes we simply update the test; it's the same for public methods serving just for tests, unless we want to keep them stable just for the testing purpose (really?). Line 1195: t = time.time() Line 1196: seconds = int(t) Line 1197: nseconds = int((t - seconds) * 10**9) Line 1198: try: -- To view, visit https://gerrit.ovirt.org/48860 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: Ieb583cd5d21e56d7730b0ba21d75ed93b9d34025 Gerrit-PatchSet: 3 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Milan Zamazal <mzama...@redhat.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Martin Polednik <mpoled...@redhat.com> Gerrit-Reviewer: Milan Zamazal <mzama...@redhat.com> Gerrit-Reviewer: gerrit-hooks <automat...@ovirt.org> Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches