~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(spiv) Make better use of smart server when a local repository is stacked on
 a remote repository. (Andrew Bennetts)

Show diffs side-by-side

added added

removed removed

Lines of Context:
480
480
        # upwards without agreement from bzr's network support maintainers.
481
481
        self.assertLength(9, self.hpss_calls)
482
482
 
 
483
    def test_branch_to_stacked_from_trivial_branch_streaming_acceptance(self):
 
484
        self.setup_smart_server_with_call_log()
 
485
        t = self.make_branch_and_tree('from')
 
486
        for count in range(9):
 
487
            t.commit(message='commit %d' % count)
 
488
        self.reset_smart_call_log()
 
489
        out, err = self.run_bzr(['branch', '--stacked', self.get_url('from'),
 
490
            'local-target'])
 
491
        # XXX: the number of hpss calls for this case isn't deterministic yet,
 
492
        # so we can't easily assert about the number of calls.
 
493
        #self.assertLength(XXX, self.hpss_calls)
 
494
        # We can assert that none of the calls were readv requests for rix
 
495
        # files, though (demonstrating that at least get_parent_map calls are
 
496
        # not using VFS RPCs).
 
497
        readvs_of_rix_files = [
 
498
            c for c in self.hpss_calls
 
499
            if c.call.method == 'readv' and c.call.args[-1].endswith('.rix')]
 
500
        self.assertLength(0, readvs_of_rix_files)
 
501
 
483
502
 
484
503
class TestRemoteBranch(TestCaseWithSFTPServer):
485
504