diff --git a/test/ganeti.locking_unittest.py b/test/ganeti.locking_unittest.py index f3630b791826ae96749044c82228b95ed5c57587..094de02982e9fd6283484e6335164813cfece253 100755 --- a/test/ganeti.locking_unittest.py +++ b/test/ganeti.locking_unittest.py @@ -1002,10 +1002,12 @@ class TestLockSet(_ThreadedTestCase): def _AcquireOne(): # Try to get the same lock again with a timeout (should never succeed) - if self.ls.acquire(wanted, timeout=0.1, shared=0): + acquired = self.ls.acquire(wanted, timeout=0.1, shared=0) + if acquired: self.done.put("acquired") self.ls.release() else: + self.assert_(acquired is None) self.assert_(not self.ls._list_owned()) self.assert_(not self.ls._is_owned()) self.done.put("not acquired")