Rev 3292: (mbp) Tests should not call or reimplement reduceLockdirTimeout when it's done in a base class in file:///home/pqm/archives/thelove/bzr/%2Btrunk/
Canonical.com Patch Queue Manager
pqm at pqm.ubuntu.com
Tue Mar 18 01:17:27 GMT 2008
At file:///home/pqm/archives/thelove/bzr/%2Btrunk/
------------------------------------------------------------
revno: 3292
revision-id:pqm at pqm.ubuntu.com-20080318011718-41sghr89tjcdpzc7
parent: pqm at pqm.ubuntu.com-20080317214818-thbkv3yfh00rj2g2
parent: mbp at sourcefrog.net-20080317044106-guta6lhn5ns9ursj
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Tue 2008-03-18 01:17:18 +0000
message:
(mbp) Tests should not call or reimplement reduceLockdirTimeout when it's done in a base class
modified:
bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
bzrlib/tests/test_commit.py test_commit.py-20050914060732-279f057f8c295434
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/tests/workingtree_implementations/test_locking.py test_locking.py-20060707151933-tav3o2hpibwi53u4-3
------------------------------------------------------------
revno: 3287.4.4
revision-id:mbp at sourcefrog.net-20080317044106-guta6lhn5ns9ursj
parent: mbp at sourcefrog.net-20080317043859-5sty12s95qmnjuv1
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: test-cleanup
timestamp: Mon 2008-03-17 15:41:06 +1100
message:
Remove one more reduceLockdirTimeout call
modified:
bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
------------------------------------------------------------
revno: 3287.4.3
revision-id:mbp at sourcefrog.net-20080317043859-5sty12s95qmnjuv1
parent: mbp at sourcefrog.net-20080317043134-ok36j0eu4g4iazhx
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: test-cleanup
timestamp: Mon 2008-03-17 15:38:59 +1100
message:
Remove redundant reduceLockdirTimeout calls
modified:
bzrlib/tests/test_commit.py test_commit.py-20050914060732-279f057f8c295434
bzrlib/tests/test_smart.py test_smart.py-20061122024551-ol0l0o0oofsu9b3t-2
bzrlib/tests/workingtree_implementations/test_locking.py test_locking.py-20060707151933-tav3o2hpibwi53u4-3
------------------------------------------------------------
revno: 3287.4.2
revision-id:mbp at sourcefrog.net-20080317043134-ok36j0eu4g4iazhx
parent: mbp at sourcefrog.net-20080317041021-ph3wr90ogt411ag4
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: test-cleanup
timestamp: Mon 2008-03-17 15:31:34 +1100
message:
Change more tests to use reduceLockdirTimeout
modified:
bzrlib/tests/bzrdir_implementations/test_bzrdir.py test_bzrdir.py-20060131065642-0ebeca5e30e30866
bzrlib/tests/workingtree_implementations/test_locking.py test_locking.py-20060707151933-tav3o2hpibwi53u4-3
------------------------------------------------------------
revno: 3287.4.1
revision-id:mbp at sourcefrog.net-20080317041021-ph3wr90ogt411ag4
parent: pqm at pqm.ubuntu.com-20080316165803-tisoc9mpob9z544o
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: test-cleanup
timestamp: Mon 2008-03-17 15:10:21 +1100
message:
test_safe_master_lock should use reduceLockdirTimeout, not reimplement it
modified:
bzrlib/tests/test_commit.py test_commit.py-20050914060732-279f057f8c295434
=== modified file 'bzrlib/tests/bzrdir_implementations/test_bzrdir.py'
--- a/bzrlib/tests/bzrdir_implementations/test_bzrdir.py 2007-12-19 13:20:40 +0000
+++ b/bzrlib/tests/bzrdir_implementations/test_bzrdir.py 2008-03-17 04:41:06 +0000
@@ -1582,12 +1582,7 @@
# its still held by the explicit lock we took, and the break
# lock should not have touched it.
repo = thisdir.open_repository()
- orig_default = lockdir._DEFAULT_TIMEOUT_SECONDS
- try:
- lockdir._DEFAULT_TIMEOUT_SECONDS = 1
- self.assertRaises(errors.LockContention, repo.lock_write)
- finally:
- lockdir._DEFAULT_TIMEOUT_SECONDS = orig_default
+ self.assertRaises(errors.LockContention, repo.lock_write)
finally:
unused_repo.unlock()
self.assertRaises(errors.LockBroken, master.unlock)
=== modified file 'bzrlib/tests/test_commit.py'
--- a/bzrlib/tests/test_commit.py 2007-12-21 06:34:27 +0000
+++ b/bzrlib/tests/test_commit.py 2008-03-17 04:38:59 +0000
@@ -1,4 +1,4 @@
-# Copyright (C) 2005, 2006 Canonical Ltd
+# Copyright (C) 2005, 2006, 2008 Canonical Ltd
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -444,14 +444,10 @@
bound = master.sprout('bound')
wt = bound.open_workingtree()
wt.branch.set_bound_location(os.path.realpath('master'))
-
- orig_default = lockdir._DEFAULT_TIMEOUT_SECONDS
master_branch.lock_write()
try:
- lockdir._DEFAULT_TIMEOUT_SECONDS = 1
self.assertRaises(LockContention, wt.commit, 'silly')
finally:
- lockdir._DEFAULT_TIMEOUT_SECONDS = orig_default
master_branch.unlock()
def test_commit_bound_merge(self):
=== modified file 'bzrlib/tests/test_smart.py'
--- a/bzrlib/tests/test_smart.py 2008-02-12 04:52:18 +0000
+++ b/bzrlib/tests/test_smart.py 2008-03-17 04:38:59 +0000
@@ -424,7 +424,6 @@
def setUp(self):
tests.TestCaseWithTransport.setUp(self)
- self.reduceLockdirTimeout()
def test_lock_write_on_unlocked_branch(self):
backing = self.get_transport()
@@ -508,7 +507,6 @@
def setUp(self):
tests.TestCaseWithTransport.setUp(self)
- self.reduceLockdirTimeout()
def test_unlock_on_locked_branch_and_repo(self):
backing = self.get_transport()
@@ -752,7 +750,6 @@
def setUp(self):
tests.TestCaseWithTransport.setUp(self)
- self.reduceLockdirTimeout()
def test_lock_write_on_unlocked_repo(self):
backing = self.get_transport()
@@ -790,7 +787,6 @@
def setUp(self):
tests.TestCaseWithTransport.setUp(self)
- self.reduceLockdirTimeout()
def test_unlock_on_locked_repo(self):
backing = self.get_transport()
=== modified file 'bzrlib/tests/workingtree_implementations/test_locking.py'
--- a/bzrlib/tests/workingtree_implementations/test_locking.py 2006-10-13 07:39:25 +0000
+++ b/bzrlib/tests/workingtree_implementations/test_locking.py 2008-03-17 04:38:59 +0000
@@ -228,13 +228,7 @@
branch_copy.lock_write()
try:
try:
- orig_default = lockdir._DEFAULT_TIMEOUT_SECONDS
- try:
- lockdir._DEFAULT_TIMEOUT_SECONDS = 1
- self.assertRaises(errors.LockError, wt.lock_write)
- finally:
- lockdir._DEFAULT_TIMEOUT_SECONDS = orig_default
-
+ self.assertRaises(errors.LockError, wt.lock_write)
self.assertFalse(wt.is_locked())
self.assertFalse(wt.branch.is_locked())
finally:
More information about the bazaar-commits
mailing list