~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-03-02 07:00:21 UTC
  • mfrom: (4060.1.4 branch.roundtrips)
  • Revision ID: pqm@pqm.ubuntu.com-20090302070021-dvcjdpf47t2aeari
(robertc) Streaming fetch from non-stacked branches on smart servers.
        (Robert Collins, Andrew Bennetts_

Show diffs side-by-side

added added

removed removed

Lines of Context:
259
259
 
260
260
class TestSmartServerBranching(ExternalBase):
261
261
 
 
262
    def test_branch_from_trivial_branch_to_same_server_branch_acceptance(self):
 
263
        self.setup_smart_server_with_call_log()
 
264
        t = self.make_branch_and_tree('from')
 
265
        for count in range(9):
 
266
            t.commit(message='commit %d' % count)
 
267
        self.reset_smart_call_log()
 
268
        out, err = self.run_bzr(['branch', self.get_url('from'),
 
269
            self.get_url('target')])
 
270
        rpc_count = len(self.hpss_calls)
 
271
        # This figure represent the amount of work to perform this use case. It
 
272
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
273
        # being too low. If rpc_count increases, more network roundtrips have
 
274
        # become necessary for this use case. Please do not adjust this number
 
275
        # upwards without agreement from bzr's network support maintainers.
 
276
        self.assertEqual(99, rpc_count)
 
277
 
262
278
    def test_branch_from_trivial_branch_streaming_acceptance(self):
263
279
        self.setup_smart_server_with_call_log()
264
280
        t = self.make_branch_and_tree('from')
265
281
        for count in range(9):
266
282
            t.commit(message='commit %d' % count)
267
283
        self.reset_smart_call_log()
268
 
        self.run_bzr(['branch', self.get_url('from'), 'local-target'])
 
284
        out, err = self.run_bzr(['branch', self.get_url('from'),
 
285
            'local-target'])
269
286
        rpc_count = len(self.hpss_calls)
270
287
        # This figure represent the amount of work to perform this use case. It
271
288
        # is entirely ok to reduce this number if a test fails due to rpc_count
272
289
        # being too low. If rpc_count increases, more network roundtrips have
273
290
        # become necessary for this use case. Please do not adjust this number
274
291
        # upwards without agreement from bzr's network support maintainers.
275
 
        self.assertEqual(68, rpc_count)
 
292
        self.assertEqual(25, rpc_count)
276
293
 
277
294
 
278
295
class TestRemoteBranch(TestCaseWithSFTPServer):