Change in vdsm[master]: virt: periodic: dispatch work to VMs

fromani at redhat.com fromani at redhat.com
Tue Mar 24 13:28:39 UTC 2015


Francesco Romani has posted comments on this change.

Change subject: virt: periodic: dispatch work to VMs
......................................................................


Patch Set 16:

(4 comments)

https://gerrit.ovirt.org/#/c/37885/16/tests/periodicTests.py
File tests/periodicTests.py:

Line 103:         self._invokations += 1
Line 104: 
Line 105: 
Line 106: @expandPermutations
Line 107: class TimeoutTests(TestCaseBase):
> move into the parent patch
Done
Line 108: 
Line 109:     @permutations([[0], [0.1], [1], [5], [99]])
Line 110:     def test_timeout_lesser_or_equal(self, interval):
Line 111:         self.assertTrue(periodic._timeout_from(interval) <= interval)


Line 117: 
Line 118:     def setUp(self):
Line 119:         self.cif = fake.ClientIF()
Line 120: 
Line 121:         for i in xrange(self.VM_NUM):
> use plain range() to be nice with py3
Done
Line 122:             vmId = str(uuid.uuid4())
Line 123:             with self.cif.vmContainerLock:
Line 124:                 self.cif.vmContainer[vmId] = _FakeVM(
Line 125:                     vmId, 'VM-%i' % i)


Line 117: 
Line 118:     def setUp(self):
Line 119:         self.cif = fake.ClientIF()
Line 120: 
Line 121:         for i in xrange(self.VM_NUM):
> range()
Done
Line 122:             vmId = str(uuid.uuid4())
Line 123:             with self.cif.vmContainerLock:
Line 124:                 self.cif.vmContainer[vmId] = _FakeVM(
Line 125:                     vmId, 'VM-%i' % i)


Line 130:         op = periodic.VmDispatcher(self.cif, _FakeExecutor(), _Visitor, 0)
Line 131:         op()
Line 132: 
Line 133:         with self.cif.vmContainerLock:
Line 134:             for vmId in self.cif.vmContainer:
> just use getVMs()
Done
Line 135:                 self.assertEqual(_Visitor.VMS.get(vmId), 1)
Line 136: 
Line 137: 
Line 138: class _Visitor(object):


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I7d0422bfce99d1e479cb5af49c7b37204ca7e295
Gerrit-PatchSet: 16
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Francesco Romani <fromani at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-Reviewer: oVirt Jenkins CI Server
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list