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 <nsof...@redhat.com> Gerrit-Reviewer: Allon Mureinik <amure...@redhat.com> Gerrit-Reviewer: Antoni Segura Puimedon <asegu...@redhat.com> Gerrit-Reviewer: Dan Kenigsberg <dan...@redhat.com> Gerrit-Reviewer: Daniel P. Berrange <berra...@redhat.com> Gerrit-Reviewer: Federico Simoncelli <fsimo...@redhat.com> Gerrit-Reviewer: Liron Ar <lara...@redhat.com> Gerrit-Reviewer: Nir Soffer <nsof...@redhat.com> Gerrit-Reviewer: Saggi Mizrahi <smizr...@redhat.com> Gerrit-Reviewer: automat...@ovirt.org Gerrit-Reviewer: oVirt Jenkins CI Server Gerrit-HasComments: Yes _______________________________________________ vdsm-patches mailing list vdsm-patches@lists.fedorahosted.org https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches