Change in vdsm[master]: tests: Add basic tests for RWLock

nsoffer at redhat.com nsoffer at redhat.com
Sun Jun 28 01:10:07 UTC 2015


Nir Soffer has posted comments on this change.

Change subject: tests: Add basic tests for RWLock
......................................................................


Patch Set 1:

(3 comments)

https://gerrit.ovirt.org/#/c/42772/1/tests/miscTests.py
File tests/miscTests.py:

Line 1274: 
Line 1275:     def test_multiple_acquire(self):
Line 1276:         lock = misc.RWLock()
Line 1277:         self.assertTrue(lock.acquire(exclusive=True))
Line 1278:         self.assertTrue(lock.acquire(exclusive=True))
I don't think these tests are correct without the next patch - lock.acquire() returns always None.
Line 1279: 
Line 1280:     def test_demote(self):
Line 1281:         lock = misc.RWLock()
Line 1282:         self.assertTrue(lock.acquire(exclusive=True))


Line 1279: 
Line 1280:     def test_demote(self):
Line 1281:         lock = misc.RWLock()
Line 1282:         self.assertTrue(lock.acquire(exclusive=True))
Line 1283:         self.assertTrue(lock.acquire(exclusive=False))
Same
Line 1284: 
Line 1285:     def test_promote(self):
Line 1286:         lock = misc.RWLock()
Line 1287:         self.assertTrue(lock.acquire(False))


Line 1283:         self.assertTrue(lock.acquire(exclusive=False))
Line 1284: 
Line 1285:     def test_promote(self):
Line 1286:         lock = misc.RWLock()
Line 1287:         self.assertTrue(lock.acquire(False))
Same


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

Gerrit-MessageType: comment
Gerrit-Change-Id: I77b9ea1cd6d378738fbf14de119c88bf0ebc94e2
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Adam Litke <alitke at redhat.com>
Gerrit-Reviewer: Ala Hino <ahino at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: automation at ovirt.org
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list