Nir Soffer has posted comments on this change. Change subject: tests: Improve utils.retry tests ......................................................................
Patch Set 2: (1 comment) https://gerrit.ovirt.org/#/c/46399/2/tests/utilsTests.py File tests/utilsTests.py: Line 121: def testTimeoutNoTimeForSleep(self): Line 122: # time action Line 123: # 0 first attempt Line 124: # 1 bail out (1 + 1 == deadline) Line 125: with FakeMonotonicTime(0) as fake_time: > I think that the "as fake_time" can be removed and "fake_time.now" can be r I also thought that this is the case, but it is not :-) "now" is not an attribute of utils.monotonic_time now, but of the FakeMonotonicTime instance. utils.monotonic_time is fake_time.monotonic_time, and it returns fake_time.now. Line 126: Line 127: def operation(): Line 128: time.sleep(1) Line 129: raise RuntimeError -- To view, visit https://gerrit.ovirt.org/46399 To unsubscribe, visit https://gerrit.ovirt.org/settings Gerrit-MessageType: comment Gerrit-Change-Id: I62062f36e20d263b1aed64135345d496cb7cfd61 Gerrit-PatchSet: 2 Gerrit-Project: vdsm Gerrit-Branch: master Gerrit-Owner: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Adam Litke <ali...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Edward Haas <edwardh....@gmail.com> Gerrit-Reviewer: Francesco Romani <from...@redhat.com> Gerrit-Reviewer: Jenkins CI Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczew...@gmail.com> Gerrit-Reviewer: Yaniv Bronhaim <ybron...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches