~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-01-12 06:30:41 UTC
  • mfrom: (4634.119.3 2.0)
  • mto: This revision was merged to the branch mainline in revision 4951.
  • Revision ID: mbp@sourcefrog.net-20100112063041-qp2ei0clx5gh0e9e
merge 2.0 back to trunk

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.clear_cache()
 
908
        chk_map._page_cache.clear()
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._get_cache()[aab_key]
 
948
        aab_bytes = chk_map._page_cache[aab_key]
949
949
        aac_key = chkmap._root_node._items['aac']
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
 
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
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'