Rev 4339: Fixed as per Robert's review. in file:///home/vila/src/bzr/experimental/failing-lock-tests/

Vincent Ladeuil v.ladeuil+lp at free.fr
Mon May 11 17:04:22 BST 2009


At file:///home/vila/src/bzr/experimental/failing-lock-tests/

------------------------------------------------------------
revno: 4339
revision-id: v.ladeuil+lp at free.fr-20090511160422-1dclel0g8wxzkpr2
parent: v.ladeuil+lp at free.fr-20090511103757-x030vepytcneozqa
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: failing-lock-tests
timestamp: Mon 2009-05-11 18:04:22 +0200
message:
  Fixed as per Robert's review.
  
  * tests/__init__.py:
  (TestCase._track_locks): Make unbalanced locks fatal.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2009-05-08 15:39:11 +0000
+++ b/NEWS	2009-05-11 16:04:22 +0000
@@ -117,6 +117,12 @@
 
 * Updated the bundled ``ConfigObj`` library to 4.6.0 (Matt Nordhoff)
 
+Testing
+*******
+
+* ``bzr selftest`` will now fail if lock/unlock are not correctly balanced in
+  tests. Using ``-Dlock`` will turn the related failures into warnings.
+  (Vincent Ladeuil, Robert Collins)
 
 bzr 1.14
 ###########

=== modified file 'bzrlib/tests/__init__.py'
--- a/bzrlib/tests/__init__.py	2009-05-08 15:58:00 +0000
+++ b/bzrlib/tests/__init__.py	2009-05-11 16:04:22 +0000
@@ -884,7 +884,7 @@
     def _track_locks(self):
         """Track lock activity during tests."""
         self._lock_actions = []
-        self._lock_check_thorough = 'lock' in debug.debug_flags
+        self._lock_check_thorough = 'lock' not in debug.debug_flags
         self.addCleanup(self._check_locks)
         _mod_lock.Lock.hooks.install_named_hook('lock_acquired',
                                                 self._lock_acquired, None)



More information about the bazaar-commits mailing list