Change in vdsm[master]: resourceManager: Keep resource state if registerResource fails
nsoffer at redhat.com
nsoffer at redhat.com
Tue Mar 4 08:12:52 UTC 2014
Nir Soffer has posted comments on this change.
Change subject: resourceManager: Keep resource state if registerResource fails
......................................................................
Patch Set 1:
(3 comments)
http://gerrit.ovirt.org/#/c/25284/1/tests/resourceManagerTests.py
File tests/resourceManagerTests.py:
Line 28:
Line 29: import storage.resourceManager as resourceManager
Line 30: from testrunner import VdsmTestCase as TestCaseBase
Line 31: from testValidation import slowtest, stresstest
Line 32: import monkeypatch
> this import should be with the non vdsm imports group
This is a vdsm test utitily module, just like testrunner and testValidation. I will move it so this group is sorted by imported name.
Line 33:
Line 34:
Line 35: class NullResourceFactory(resourceManager.SimpleResourceFactory):
Line 36: """
Line 221: # And it should not leave a locked resource
Line 222: with self.manager.acquireResource("string", "test",
Line 223: resourceManager.LockType.exclusive,
Line 224: 0):
Line 225: pass
> the only difference between those methos is the lock type,
Good idea
Line 226:
Line 227: def testRegisterResourceFailureShared(self):
Line 228: # This regeisterion must fail
Line 229: with monkeypatch.MonkeyPatchScope(
Line 741:
Line 742:
Line 743: def FakeRequestRef(*a, **kw):
Line 744: """ Used to simulate failures when registering a resource """
Line 745: raise Failure()
> when you add the test helper method, those can be defined within.
Good idea
--
To view, visit http://gerrit.ovirt.org/25284
To unsubscribe, visit http://gerrit.ovirt.org/settings
Gerrit-MessageType: comment
Gerrit-Change-Id: I16abf41ebc8a8a99b292d38c945074752254a34b
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Antoni Segura Puimedon <asegurap at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Daniel P. Berrange <berrange at redhat.com>
Gerrit-Reviewer: Federico Simoncelli <fsimonce at redhat.com>
Gerrit-Reviewer: Liron Ar <laravot at redhat.com>
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Saggi Mizrahi <smizrahi 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