~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockdir.py

  • Committer: Martin Pool
  • Date: 2011-06-10 07:17:58 UTC
  • mfrom: (5425.6.3 220464-stale-locks)
  • mto: This revision was merged to the branch mainline in revision 5970.
  • Revision ID: mbp@canonical.com-20110610071758-t1ts81zcqx9990yx
Merge checks for username

Show diffs side-by-side

added added

removed removed

Lines of Context:
685
685
    def test_lock_holder_other_machine(self):
686
686
        """The lock holder isn't here so we don't know if they're alive."""
687
687
        info = LockHeldInfo.for_this_process(None)
688
 
        info.info_dict['host'] = 'egg.example.com'
 
688
        info.info_dict['hostname'] = 'egg.example.com'
 
689
        info.info_dict['pid'] = '123123123' # probably not alive at all
 
690
        self.assertFalse(info.is_lock_holder_known_dead())
 
691
 
 
692
    def test_lock_holder_other_user(self):
 
693
        """Only auto-break locks held by this user."""
 
694
        info = LockHeldInfo.for_this_process(None)
 
695
        info.info_dict['user'] = 'notme@example.com'
 
696
        info.info_dict['pid'] = '123123123' # probably not alive at all
689
697
        self.assertFalse(info.is_lock_holder_known_dead())
690
698
 
691
699
    def test_no_good_hostname(self):