~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_workingtree/test_locking.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-08-14 15:22:39 UTC
  • mfrom: (4523.4.21 1.18-lock-warnings)
  • Revision ID: pqm@pqm.ubuntu.com-20090814152239-m0ybwy7vfs32exeh
(jam) Update the test suite to cause failures when we take out
        multiple locks on the same file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
105
105
 
106
106
        :param methodname: The lock method to use to establish locks.
107
107
        """
 
108
        # This write locks the local tree, and then grabs a read lock on a
 
109
        # copy, which is bogus and the test just needs to be rewritten.
 
110
        self.thisFailsStrictLockCheck()
108
111
        # when unlocking the last lock count from tree_write_lock,
109
112
        # the tree should do a flush().
110
113
        # we test that by changing the inventory using set_root_id
128
131
        tree.set_root_id('new-root')
129
132
        # to detect that the inventory is written by unlock, we
130
133
        # first check that it was not written yet.
 
134
        # TODO: This requires taking a read lock while we are holding the above
 
135
        #       write lock, which shouldn't actually be possible
131
136
        reference_tree = tree.bzrdir.open_workingtree()
132
137
        self.assertEqual(old_root, reference_tree.get_root_id())
133
138
        # now unlock the second held lock, which should do nothing.