/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-06-03 23:48:08 UTC
  • mfrom: (7316 work)
  • mto: This revision was merged to the branch mainline in revision 7328.
  • Revision ID: jelmer@jelmer.uk-20190603234808-15yk5c7054tj8e2b
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
 
        # Stealing dead locks is enabled by default.
 
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)
739
741
        # Create a lock pretending to come from a different nonexistent
740
742
        # process on the same machine.
741
743
        l1 = LockDir(self.get_transport(), 'a',
752
754
        """Automatic breaking can be turned off"""
753
755
        l1 = LockDir(self.get_transport(), 'a',
754
756
                     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 disabled.
 
760
        # This fails now, because dead lock breaking is off by default.
761
761
        self.assertRaises(LockContention,
762
762
                          l2.attempt_lock)
763
763
        # and it's in fact not broken