~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-12-14 12:53:59 UTC
  • mfrom: (6352.2.5 hpss-no-vfs)
  • Revision ID: pqm@pqm.ubuntu.com-20111214125359-l2d2nv046utd1vfz
(jelmer) Add ContainsNoVfsCalls matcher. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
    HardlinkFeature,
37
37
    )
38
38
from bzrlib.tests.blackbox import test_switch
 
39
from bzrlib.tests.matchers import ContainsNoVfsCalls
39
40
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
40
41
from bzrlib.tests.script import run_script
41
42
from bzrlib.urlutils import local_path_to_url, strip_trailing_slash
483
484
        # become necessary for this use case. Please do not adjust this number
484
485
        # upwards without agreement from bzr's network support maintainers.
485
486
        self.assertLength(40, self.hpss_calls)
 
487
        self.expectFailure("branching to the same branch requires VFS access",
 
488
            self.assertThat, self.hpss_calls, ContainsNoVfsCalls)
486
489
 
487
490
    def test_branch_from_trivial_branch_streaming_acceptance(self):
488
491
        self.setup_smart_server_with_call_log()
497
500
        # being too low. If rpc_count increases, more network roundtrips have
498
501
        # become necessary for this use case. Please do not adjust this number
499
502
        # upwards without agreement from bzr's network support maintainers.
 
503
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
500
504
        self.assertLength(10, self.hpss_calls)
501
505
 
502
506
    def test_branch_from_trivial_stacked_branch_streaming_acceptance(self):
517
521
        # being too low. If rpc_count increases, more network roundtrips have
518
522
        # become necessary for this use case. Please do not adjust this number
519
523
        # upwards without agreement from bzr's network support maintainers.
 
524
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
520
525
        self.assertLength(15, self.hpss_calls)
521
526
 
522
527
    def test_branch_from_branch_with_tags(self):
534
539
        # being too low. If rpc_count increases, more network roundtrips have
535
540
        # become necessary for this use case. Please do not adjust this number
536
541
        # upwards without agreement from bzr's network support maintainers.
 
542
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
537
543
        self.assertLength(10, self.hpss_calls)
538
544
 
539
545
    def test_branch_to_stacked_from_trivial_branch_streaming_acceptance(self):
554
560
            c for c in self.hpss_calls
555
561
            if c.call.method == 'readv' and c.call.args[-1].endswith('.rix')]
556
562
        self.assertLength(0, readvs_of_rix_files)
 
563
        self.expectFailure("branching to stacked requires VFS access",
 
564
            self.assertThat, self.hpss_calls, ContainsNoVfsCalls)
557
565
 
558
566
 
559
567
class TestRemoteBranch(TestCaseWithSFTPServer):