Rev 5761: Test that the record stream has the correct values set. in http://bazaar.launchpad.net/~jameinel/bzr/2.4-max-entries-gc-602614
John Arbash Meinel
john at arbash-meinel.com
Thu May 12 15:14:05 UTC 2011
At http://bazaar.launchpad.net/~jameinel/bzr/2.4-max-entries-gc-602614
------------------------------------------------------------
revno: 5761
revision-id: john at arbash-meinel.com-20110512151353-zl1itwq3ehaz9y6x
parent: john at arbash-meinel.com-20110512150951-h7sdnrsn0zt9l5zl
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: 2.4-max-entries-gc-602614
timestamp: Thu 2011-05-12 17:13:53 +0200
message:
Test that the record stream has the correct values set.
-------------- next part --------------
=== modified file 'bzrlib/tests/test_groupcompress.py'
--- a/bzrlib/tests/test_groupcompress.py 2011-05-12 15:09:51 +0000
+++ b/bzrlib/tests/test_groupcompress.py 2011-05-12 15:13:53 +0000
@@ -553,6 +553,23 @@
'as-requested', False)]
self.assertEqual([('b',), ('a',), ('d',), ('c',)], keys)
+ def test_get_record_stream_max_entries_per_source_default(self):
+ vf = self.make_test_vf(True, dir='source')
+ vf.add_lines(('a',), (), ['lines\n'])
+ vf.writer.end()
+ record = vf.get_record_stream([('a',)], 'unordered', True).next()
+ self.assertEqual(vf._DEFAULT_MAX_ENTRIES_PER_SOURCE,
+ record._manager._get_max_entries_per_source())
+
+ def test_get_record_stream_accesses_max_entries_per_source_default(self):
+ vf = self.make_test_vf(True, dir='source')
+ vf.add_lines(('a',), (), ['lines\n'])
+ vf.writer.end()
+ vf._max_entries_per_source = 1234
+ record = vf.get_record_stream([('a',)], 'unordered', True).next()
+ self.assertEqual(1234, record._manager._get_max_entries_per_source())
+
+
def test_insert_record_stream_reuses_blocks(self):
vf = self.make_test_vf(True, dir='source')
def grouped_stream(revision_ids, first_parents=()):
More information about the bazaar-commits
mailing list