/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 breezy/tests/blackbox/test_checkout.py

  • Committer: Jelmer Vernooij
  • Date: 2020-03-22 20:02:36 UTC
  • mto: (7490.7.7 work)
  • mto: This revision was merged to the branch mainline in revision 7501.
  • Revision ID: jelmer@jelmer.uk-20200322200236-fsbl91ktcn6fcbdd
Fix tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
from breezy.tests import (
31
31
    TestCaseWithTransport,
32
32
    )
 
33
from breezy.tests.matchers import ContainsNoVfsCalls
33
34
from breezy.tests.features import (
34
35
    HardlinkFeature,
35
36
    )
194
195
        self.assertEqual(
195
196
            target.open_branch(name='somebranch').user_url,
196
197
            target.get_branch_reference(name=""))
 
198
 
 
199
 
 
200
class TestSmartServerCheckout(TestCaseWithTransport):
 
201
 
 
202
    def test_heavyweight_checkout(self):
 
203
        self.setup_smart_server_with_call_log()
 
204
        t = self.make_branch_and_tree('from')
 
205
        for count in range(9):
 
206
            t.commit(message='commit %d' % count)
 
207
        self.reset_smart_call_log()
 
208
        out, err = self.run_bzr(['checkout', self.get_url('from'), 'target'])
 
209
        # This figure represent the amount of work to perform this use case. It
 
210
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
211
        # being too low. If rpc_count increases, more network roundtrips have
 
212
        # become necessary for this use case. Please do not adjust this number
 
213
        # upwards without agreement from bzr's network support maintainers.
 
214
        self.assertLength(11, self.hpss_calls)
 
215
        self.assertLength(1, self.hpss_connections)
 
216
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
 
217
 
 
218
    def test_lightweight_checkout(self):
 
219
        self.setup_smart_server_with_call_log()
 
220
        t = self.make_branch_and_tree('from')
 
221
        for count in range(9):
 
222
            t.commit(message='commit %d' % count)
 
223
        self.reset_smart_call_log()
 
224
        out, err = self.run_bzr(['checkout', '--lightweight', self.get_url('from'),
 
225
                                 'target'])
 
226
        # This figure represent the amount of work to perform this use case. It
 
227
        # is entirely ok to reduce this number if a test fails due to rpc_count
 
228
        # being too low. If rpc_count increases, more network roundtrips have
 
229
        # become necessary for this use case. Please do not adjust this number
 
230
        # upwards without agreement from bzr's network support maintainers.
 
231
        self.assertLength(13, self.hpss_calls)
 
232
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)