Rev 2465: Remove a break-lock test that was duplicating lower level testing without adding value. in file:///home/robertc/source/baz/dirstate/
Robert Collins
robertc at robertcollins.net
Thu Mar 1 05:28:06 GMT 2007
At file:///home/robertc/source/baz/dirstate/
------------------------------------------------------------
revno: 2465
revision-id: robertc at robertcollins.net-20070301052802-zwbocbr7z5vyptad
parent: robertc at robertcollins.net-20070301052607-x77gnbfssigedky4
committer: Robert Collins <robertc at robertcollins.net>
branch nick: dirstate
timestamp: Thu 2007-03-01 16:28:02 +1100
message:
Remove a break-lock test that was duplicating lower level testing without adding value.
modified:
bzrlib/tests/blackbox/test_break_lock.py test_break_lock.py-20060303014503-a90e07d38d042d1d
=== modified file 'bzrlib/tests/blackbox/test_break_lock.py'
--- a/bzrlib/tests/blackbox/test_break_lock.py 2007-02-25 21:52:19 +0000
+++ b/bzrlib/tests/blackbox/test_break_lock.py 2007-03-01 05:28:02 +0000
@@ -92,37 +92,6 @@
self.assertRaises(errors.LockBroken, self.wt.unlock)
self.assertRaises(errors.LockBroken, self.master_branch.unlock)
- def test_saying_no_leaves_it_locked(self):
- ### if 'no' is answered, objects should remain locked.
- self.wt.lock_write()
- try:
- self.master_branch.lock_write()
- try:
- # run the break-lock
- # we need 5 yes's - wt, branch, repo, bound branch, bound repo.
- self.run_bzr('break-lock', 'checkout', stdin="n\nn\nn\nn\nn\n")
-
- # The default timeout to wait for LockContention is 5 minutes.
- # we need to override this temporarily.
- # TODO: jam 20060927 When we have per repository/branch/tree
- # timeouts set the value of the repository,
- # rather than setting the global default.
- orig_default = lockdir._DEFAULT_TIMEOUT_SECONDS
- try:
- lockdir._DEFAULT_TIMEOUT_SECONDS = 1
- # a new tree instance should not be lockable
- wt = bzrlib.workingtree.WorkingTree.open('checkout')
- self.assertRaises(errors.LockContention, wt.lock_write)
- # and a new instance of the master branch
- mb = wt.branch.get_master_branch()
- self.assertRaises(errors.LockContention, mb.lock_write)
- finally:
- lockdir._DEFAULT_TIMEOUT_SECONDS = orig_default
- # unlock our branches normally.
- finally:
- self.master_branch.unlock()
- finally:
- self.wt.unlock()
class TestBreakLockOldBranch(ExternalBase):
More information about the bazaar-commits
mailing list