Change in vdsm[master]: vm: unit test for vm._waitForDriveRemoval

nsoffer at redhat.com nsoffer at redhat.com
Tue Dec 1 17:23:11 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: vm: unit test for vm._waitForDriveRemoval
......................................................................


Patch Set 11:

(1 comment)

https://gerrit.ovirt.org/#/c/48880/11/vdsm/virt/vm.py
File vdsm/virt/vm.py:

Line 2714:         self.log.debug("Waiting for hotunplug to finish")
Line 2715:         with utils.stopwatch("Hotunplug disk %s" % drive.name):
Line 2716:             deadline = (utils.monotonic_time() +
Line 2717:                         config.getfloat('vars', 'hotunplug_timeout'))
Line 2718:             sleep_time = config.getfloat('vars', 'hotunplug_check_interval')
> not sure this should be float, but could be fixed later.
It must be for the tests, unless we monkeypatch the utils.monotonic_time() and time.sleep() during the tests.
Line 2719:             while self._isDriveAttached(drive):
Line 2720:                 time.sleep(sleep_time)
Line 2721:                 if utils.monotonic_time() > deadline:
Line 2722:                     raise HotunplugTimeout("Timeout detaching drive %s"


-- 
To view, visit https://gerrit.ovirt.org/48880
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I4d1f86e17132a7099f109a5e33407c56dde40df2
Gerrit-PatchSet: 11
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Amit Aviram <aaviram at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Marcin Mirecki <mmirecki at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Vinzenz Feenstra <vfeenstr at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list