~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_knit.py

Fix 4 more lock-related test failures.

* tests/test_knit.py:
(TestPackKnitAccess.make_vf_for_retrying): The tree should be
unlocked, not only the repository.

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
        """
369
369
        tree = self.make_branch_and_memory_tree('tree')
370
370
        tree.lock_write()
371
 
        self.addCleanup(tree.branch.repository.unlock)
 
371
        self.addCleanup(tree.unlock)
372
372
        tree.add([''], ['root-id'])
373
373
        tree.commit('one', rev_id='rev-1')
374
374
        tree.commit('two', rev_id='rev-2')
385
385
        collection.reset()
386
386
        repo.refresh_data()
387
387
        vf = tree.branch.repository.revisions
388
 
        del tree
389
388
        # Set up a reload() function that switches to using the new pack file
390
389
        new_index = new_pack.revision_index
391
390
        access_tuple = new_pack.access_tuple()