Change in vdsm[master]: tests: Improve utils.retry tests

nsoffer at redhat.com nsoffer at redhat.com
Sun Sep 27 17:15:21 UTC 2015


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 <nsoffer at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh.dev at gmail.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Piotr Kliczewski <piotr.kliczewski at gmail.com>
Gerrit-Reviewer: Yaniv Bronhaim <ybronhei at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list