Nir Soffer has posted comments on this change.

Change subject: storage: Introduce guarded utilities
......................................................................


Patch Set 13: Code-Review-1

(2 comments)

https://gerrit.ovirt.org/#/c/61435/13/tests/storage_guarded_test.py
File tests/storage_guarded_test.py:

Line 134:             with guarded.context(locks):
Line 135:                 pass
Line 136:         self.assertEqual(expected, log)
Line 137: 
Line 138:     def test_release_failure(self):
We need same test for acquire error, ensuring that we do not leave acquired 
locks on errors.
Line 139:         log = []
Line 140:         locks = [
Line 141:             FakeGuardedLock('01_dom', 'dom1', 'mode', log),
Line 142:             FakeGuardedLock('02_img', 'img1', 'mode', log),


Line 170:             with guarded.context(locks):
Line 171:                 raise InjectedFailure()
Line 172:         self.assertEqual(expected, log)
Line 173: 
Line 174:     def test_fail_inside_context_with_release_failure(self):
Having the same test with acquire error would be also useful.
Line 175:         log = []
Line 176:         locks = [
Line 177:             FakeGuardedLock('01_dom', 'dom1', 'mode', log),
Line 178:             FakeGuardedLock('02_img', 'img1', 'mode', log),


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I2b0a204818d44b6205515277f4c2834cb2b7a057
Gerrit-PatchSet: 13
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <[email protected]>
Gerrit-Reviewer: Adam Litke <[email protected]>
Gerrit-Reviewer: Freddy Rolland <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Liron Aravot <[email protected]>
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
Gerrit-HasComments: Yes
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/admin/lists/[email protected]

Reply via email to