/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-12-01 11:53:02 UTC
  • mfrom: (6323.2.4 hpss-call-counts-2)
  • Revision ID: pqm@pqm.ubuntu.com-20111201115302-ca9t4zzn13swv0p1
(jelmer) Add HPSS call count tests for 'bzr co',
 'bzr co --lightweight' and 'bzr commit' in a lightweight checkout. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
833
833
        self.assertEqual(out, '')
834
834
        self.assertContainsRe(err,
835
835
            'Branch.*test_checkout.*appears to be bound to itself')
 
836
 
 
837
 
 
838
class TestSmartServerCommit(TestCaseWithTransport):
 
839
 
 
840
    def test_commit_to_lightweight(self):
 
841
        self.setup_smart_server_with_call_log()
 
842
        t = self.make_branch_and_tree('from')
 
843
        for count in range(9):
 
844
            t.commit(message='commit %d' % count)
 
845
        out, err = self.run_bzr(['checkout', '--lightweight', self.get_url('from'),
 
846
            'target'])
 
847
        self.reset_smart_call_log()
 
848
        self.build_tree(['target/afile'])
 
849
        self.run_bzr(['add', 'target/afile'])
 
850
        out, err = self.run_bzr(['commit', '-m', 'do something', 'target'])
 
851
        # This figure represent the amount of work to perform this use case. It
 
852
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
853
        # being too low. If rpc_count increases, more network roundtrips have
 
854
        # become necessary for this use case. Please do not adjust this number
 
855
        # upwards without agreement from bzr's network support maintainers.
 
856
        self.assertLength(220, self.hpss_calls)