~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_lockdir.py

  • Committer: Martin Pool
  • Date: 2010-09-15 07:04:50 UTC
  • mto: (5425.4.19 220464-stale-locks)
  • mto: This revision was merged to the branch mainline in revision 5970.
  • Revision ID: mbp@sourcefrog.net-20100915070450-h6vz2kiy61ki2j89
add xfail tests for stale locks

Show diffs side-by-side

added added

removed removed

Lines of Context:
873
873
        ld2.force_break(holder_info)
874
874
        lock_path = ld.transport.abspath(ld.path)
875
875
        self.assertEqual([], self._calls)
 
876
 
 
877
 
 
878
class TestStaleLockDir(TestCaseWithMemoryTransport):
 
879
    """bzr can detect and specially deal with stale locks.
 
880
 
 
881
    A detectable stale lock is one where the hostname is the same as the one
 
882
    where bzr is running, and there's no running process with the pid given in
 
883
    the file.
 
884
 
 
885
    :see: https://bugs.launchpad.net/bzr/+bug/220464
 
886
    """
 
887
 
 
888
    def test_lock_holder_still_active(self):
 
889
        """Detect that the holder (this process) is still running."""
 
890
        self.knownFailure("not implemented")
 
891
        
 
892
    def test_lock_holder_other_machine(self):
 
893
        """The lock holder isn't here so we don't know if they're alive."""
 
894
        self.knownFailure("not implemented")
 
895
 
 
896
    def test_lock_holder_gone(self):
 
897
        """Lock holder a dead process on the same machine."""
 
898
        self.knownFailure("not implemented")
 
899
 
 
900
    def test_no_good_hostname(self):
 
901
        """Correctly handle ambiguous hostnames.
 
902
 
 
903
        If the lock's recorded with just 'localhost' we can't really trust
 
904
        it's the same 'localhost'.
 
905
        """
 
906
        self.knownFailure("not implemented")
 
907
 
 
908
    def test_auto_break_stale_lock(self):
 
909
        """Locks safely known to be stale are just cleaned up.
 
910
 
 
911
        This generates a warning but no other user interaction.
 
912
        """
 
913
        self.knownFailure("not implemented")
 
914
 
 
915
    def test_auto_break_stale_lock_configured_off(self):
 
916
        self.knownFailure("not implemented")
 
917
 
 
918
    def test_break_stale_lock_no_confirmation(self):
 
919
        self.knownFailure("not implemented")
 
920