~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-12-02 01:57:00 UTC
  • mfrom: (3876.1.2 303538_max_readv)
  • Revision ID: pqm@pqm.ubuntu.com-20081202015700-3mc9dola31w7h5h4
(jam) Fix bug #303538 by capping readv sections to 100MB

Show diffs side-by-side

added added

removed removed

Lines of Context:
225
225
                   [(10, 10), (20, 10), (30, 50), (80, 100)],
226
226
                  )
227
227
 
 
228
    def test_coalesce_default_limit(self):
 
229
        # By default we use a 100MB max size.
 
230
        ten_mb = 10*1024*1024
 
231
        self.check([(0, 10*ten_mb, [(i*ten_mb, ten_mb) for i in range(10)]),
 
232
                    (10*ten_mb, ten_mb, [(0, ten_mb)])],
 
233
                   [(i*ten_mb, ten_mb) for i in range(11)])
 
234
        self.check([(0, 11*ten_mb, [(i*ten_mb, ten_mb) for i in range(11)]),],
 
235
                   [(i*ten_mb, ten_mb) for i in range(11)],
 
236
                   max_size=1*1024*1024*1024)
 
237
 
228
238
 
229
239
class TestMemoryTransport(TestCase):
230
240