/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_switch.py

  • Committer: Breezy landing bot
  • Author(s): Jelmer Vernooij
  • Date: 2020-07-28 02:47:10 UTC
  • mfrom: (7519.1.1 merge-3.1)
  • Revision ID: breezy.the.bot@gmail.com-20200728024710-a2ylds219f1lsl62
Merge lp:brz/3.1.

Merged from https://code.launchpad.net/~jelmer/brz/merge-3.1/+merge/388173

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
from breezy.tests.features import UnicodeFilenameFeature
35
35
from breezy.directory_service import directories
36
36
 
37
 
from breezy.tests.matchers import ContainsNoVfsCalls
38
 
 
39
37
 
40
38
class TestSwitch(TestCaseWithTransport):
41
39
 
476
474
        self.assertEqual(1, opened.count('master'))
477
475
 
478
476
 
479
 
class TestSmartServerSwitch(TestCaseWithTransport):
480
 
 
481
 
    def test_switch_lightweight(self):
482
 
        self.setup_smart_server_with_call_log()
483
 
        t = self.make_branch_and_tree('from')
484
 
        for count in range(9):
485
 
            t.commit(message='commit %d' % count)
486
 
        out, err = self.run_bzr(['checkout', '--lightweight', self.get_url('from'),
487
 
                                 'target'])
488
 
        self.reset_smart_call_log()
489
 
        self.run_bzr(['switch', self.get_url('from')], working_dir='target')
490
 
        # This figure represent the amount of work to perform this use case. It
491
 
        # is entirely ok to reduce this number if a test fails due to rpc_count
492
 
        # being too low. If rpc_count increases, more network roundtrips have
493
 
        # become necessary for this use case. Please do not adjust this number
494
 
        # upwards without agreement from bzr's network support maintainers.
495
 
        self.assertLength(21, self.hpss_calls)
496
 
        self.assertLength(3, self.hpss_connections)
497
 
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
498
 
 
499
 
 
500
477
class TestSwitchUncommitted(TestCaseWithTransport):
501
478
 
502
479
    def prepare(self):