~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_chk_map.py

Activate test for common node skipping. - 50 times performance improvement.

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
        basis = self._get_map(basis_dict, maximum_size=10)
206
206
        target = self._get_map(target_dict, maximum_size=10,
207
207
            chk_bytes=basis._store)
 
208
        basis_get = basis._store.get_record_stream
 
209
        def get_record_stream(keys, order, fulltext):
 
210
            if ('sha1:1adf7c0d1b9140ab5f33bb64c6275fa78b1580b7',) in keys:
 
211
                self.fail("'aaa' pointer was followed %r" % keys)
 
212
            return basis_get(keys, order, fulltext)
 
213
        basis._store.get_record_stream = get_record_stream
208
214
        result = sorted(list(target.iter_changes(basis)))
209
215
        for change in result:
210
216
            if change[0] == ('aaa',):
211
217
                self.fail("Found unexpected change: %s" % change)
212
 
        return
213
 
        # check both target and basis did not load the aaa pointer
214
 
        self.assertIsInstance(target._root_node._items['aa']._items['aaa'],
215
 
            tuple)
216
 
        self.assertIsInstance(basis._root_node._items['a']._items['aaa'],
217
 
            tuple)
218
218
 
219
219
    def test_iter_changes_unchanged_keys_in_multi_key_leafs_ignored(self):
220
220
        # Within a leaf there are no hash's to exclude keys, make sure multi