/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to breezy/tests/test_lockdir.py

  • Committer: Jelmer Vernooij
  • Date: 2019-08-11 13:33:45 UTC
  • mfrom: (7379 work)
  • mto: This revision was merged to the branch mainline in revision 7389.
  • Revision ID: jelmer@jelmer.uk-20190811133345-dp9j3c569vxj4l9y
merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
735
735
        """
736
736
        self.overrideAttr(lockdir, 'get_host_name',
737
737
                          lambda: 'aproperhostname')
738
 
        # This is off by default at present; see the discussion in the bug.
739
 
        # If you change the default, don't forget to update the docs.
740
 
        config.GlobalStack().set('locks.steal_dead', True)
 
738
        # Stealing dead locks is enabled by default.
741
739
        # Create a lock pretending to come from a different nonexistent
742
740
        # process on the same machine.
743
741
        l1 = LockDir(self.get_transport(), 'a',
754
752
        """Automatic breaking can be turned off"""
755
753
        l1 = LockDir(self.get_transport(), 'a',
756
754
                     extra_holder_info={'pid': '12312313'})
 
755
        # Stealing dead locks is enabled by default, so disable it.
 
756
        config.GlobalStack().set('locks.steal_dead', False)
757
757
        token_1 = l1.attempt_lock()
758
758
        self.addCleanup(l1.unlock)
759
759
        l2 = LockDir(self.get_transport(), 'a')
760
 
        # This fails now, because dead lock breaking is off by default.
 
760
        # This fails now, because dead lock breaking is disabled.
761
761
        self.assertRaises(LockContention,
762
762
                          l2.attempt_lock)
763
763
        # and it's in fact not broken