At http://bazaar.launchpad.net/~jameinel/bzr/1.18-lock-warnings
------------------------------------------------------------
revno: 4526
revision-id: [email protected]
parent: [email protected]
committer: John Arbash Meinel <[email protected]>
branch nick: 1.18-lock-warnings
timestamp: Fri 2009-07-10 15:07:24 -0500
message:
Having a write lock should block a read lock and vice-versa.
=== modified file 'bzrlib/tests/test_lock.py'
--- a/bzrlib/tests/test_lock.py 2009-07-10 18:00:43 +0000
+++ b/bzrlib/tests/test_lock.py 2009-07-10 20:07:24 +0000
@@ -78,6 +78,15 @@
finally:
r_lock.unlock()
+ def test_write_locks_block_read_lock(self):
+ w_lock = self.write_lock('a-lock-file')
+ try:
+ self.assertRaises(errors.LockContention,
+ self.read_lock, 'a-lock-file')
+ finally:
+ w_lock.unlock()
+
+
def test_temporary_write_lock(self):
r_lock = self.read_lock('a-lock-file')
try:
--
bazaar-commits mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/bazaar-commits