/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-06-19 21:26:53 UTC
  • mfrom: (7490.40.19 work)
  • mto: This revision was merged to the branch mainline in revision 7516.
  • Revision ID: jelmer@jelmer.uk-20200619212653-7j6rgywzczhc8cmj
Merge lp:brz/3.1.

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.bzr.tests.matchers import ContainsNoVfsCalls
34
33
from breezy.tests.features import (
35
34
    HardlinkFeature,
36
35
    )
195
194
        self.assertEqual(
196
195
            target.open_branch(name='somebranch').user_url,
197
196
            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)