~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-11-23 11:48:53 UTC
  • mfrom: (6283.1.15 hpss-call-counts)
  • Revision ID: pqm@pqm.ubuntu.com-20111123114853-98k118t2i003fdzn
(jelmer) Test the number of HPSS calls for some common opererations. (Jelmer
 Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1052
1052
        self.assertLogRevnos(["--match-author", "author"], ["2", "1"])
1053
1053
        self.assertLogRevnos(["--match-author", "author1", 
1054
1054
                              "--match-author", "author2"], ["2", "1"])
 
1055
 
 
1056
 
 
1057
class TestSmartServerLog(tests.TestCaseWithTransport):
 
1058
 
 
1059
    def test_standard_log(self):
 
1060
        self.setup_smart_server_with_call_log()
 
1061
        t = self.make_branch_and_tree('branch')
 
1062
        self.build_tree_contents([('branch/foo', 'thecontents')])
 
1063
        t.add("foo")
 
1064
        t.commit("message")
 
1065
        self.reset_smart_call_log()
 
1066
        out, err = self.run_bzr(['log', self.get_url('branch')])
 
1067
        # This figure represent the amount of work to perform this use case. It
 
1068
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
1069
        # being too low. If rpc_count increases, more network roundtrips have
 
1070
        # become necessary for this use case. Please do not adjust this number
 
1071
        # upwards without agreement from bzr's network support maintainers.
 
1072
        self.assertLength(15, self.hpss_calls)
 
1073
 
 
1074
    def test_verbose_log(self):
 
1075
        self.setup_smart_server_with_call_log()
 
1076
        t = self.make_branch_and_tree('branch')
 
1077
        self.build_tree_contents([('branch/foo', 'thecontents')])
 
1078
        t.add("foo")
 
1079
        t.commit("message")
 
1080
        self.reset_smart_call_log()
 
1081
        out, err = self.run_bzr(['log', '-v', self.get_url('branch')])
 
1082
        # This figure represent the amount of work to perform this use case. It
 
1083
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
1084
        # being too low. If rpc_count increases, more network roundtrips have
 
1085
        # become necessary for this use case. Please do not adjust this number
 
1086
        # upwards without agreement from bzr's network support maintainers.
 
1087
        self.assertLength(20, self.hpss_calls)