~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_chk_map.py

  • Committer: Martin Pool
  • Date: 2010-02-01 17:00:29 UTC
  • mfrom: (4797.2.9 2.1)
  • mto: This revision was merged to the branch mainline in revision 4998.
  • Revision ID: mbp@sourcefrog.net-20100201170029-s552yf3v1f47ml1s
merge 2.1 to trunk, including fix for bug 514090

Show diffs side-by-side

added added

removed removed

Lines of Context:
905
905
        # Unmapping the new node will check the existing nodes to see if they
906
906
        # would fit.
907
907
        # Clear the page cache so we ensure we have to read all the children
908
 
        chk_map._page_cache.clear()
 
908
        chk_map.clear_cache()
909
909
        chkmap.unmap(('aad',))
910
910
        self.assertIsInstance(chkmap._root_node._items['aaa'], LeafNode)
911
911
        self.assertIsInstance(chkmap._root_node._items['aab'], LeafNode)
945
945
        # Now clear the page cache, and only include 2 of the children in the
946
946
        # cache
947
947
        aab_key = chkmap._root_node._items['aab']
948
 
        aab_bytes = chk_map._page_cache[aab_key]
 
948
        aab_bytes = chk_map._get_cache()[aab_key]
949
949
        aac_key = chkmap._root_node._items['aac']
950
 
        aac_bytes = chk_map._page_cache[aac_key]
951
 
        chk_map._page_cache.clear()
952
 
        chk_map._page_cache[aab_key] = aab_bytes
953
 
        chk_map._page_cache[aac_key] = aac_bytes
 
950
        aac_bytes = chk_map._get_cache()[aac_key]
 
951
        chk_map.clear_cache()
 
952
        chk_map._get_cache()[aab_key] = aab_bytes
 
953
        chk_map._get_cache()[aac_key] = aac_bytes
954
954
 
955
955
        # Unmapping the new node will check the nodes from the page cache
956
956
        # first, and not have to read in 'aaa'