Rev 5332: Remove duplicate test get_parent_map_after_insert_stream. in http://bazaar.launchpad.net/~lifeless/bzr/loomsupport
Robert Collins
robertc at robertcollins.net
Sat Jul 3 09:44:35 BST 2010
At http://bazaar.launchpad.net/~lifeless/bzr/loomsupport
------------------------------------------------------------
revno: 5332
revision-id: robertc at robertcollins.net-20100703084427-8ck2w7jhrxo4brfy
parent: pqm at pqm.ubuntu.com-20100703000054-331rh98r3u7s211l
committer: Robert Collins <robertc at robertcollins.net>
branch nick: loomsupport
timestamp: Sat 2010-07-03 18:44:27 +1000
message:
Remove duplicate test get_parent_map_after_insert_stream.
=== modified file 'bzrlib/tests/per_branch/test_push.py'
--- a/bzrlib/tests/per_branch/test_push.py 2010-02-23 07:43:11 +0000
+++ b/bzrlib/tests/per_branch/test_push.py 2010-07-03 08:44:27 +0000
@@ -19,6 +19,11 @@
from cStringIO import StringIO
import os
+from testtools.matchers import (
+ Equals,
+ MatchesAny,
+ )
+
from bzrlib import (
branch,
builtins,
@@ -231,59 +236,6 @@
trunk.push(remote_branch)
check.check_dwim(remote_branch.base, False, True, True)
- def test_no_get_parent_map_after_insert_stream(self):
- # Effort test for bug 331823
- self.setup_smart_server_with_call_log()
- # Make a local branch with four revisions. Four revisions because:
- # one to push, one there for _walk_to_common_revisions to find, one we
- # don't want to access, one for luck :)
- if isinstance(self.branch_format, branch.BranchReferenceFormat):
- # This test could in principle apply to BranchReferenceFormat, but
- # make_branch_builder doesn't support it.
- raise tests.TestSkipped(
- "BranchBuilder can't make reference branches.")
- try:
- builder = self.make_branch_builder('local')
- except (errors.TransportNotPossible, errors.UninitializableFormat):
- raise tests.TestNotApplicable('format not directly constructable')
- builder.start_series()
- builder.build_snapshot('first', None, [
- ('add', ('', 'root-id', 'directory', ''))])
- builder.build_snapshot('second', ['first'], [])
- builder.build_snapshot('third', ['second'], [])
- builder.build_snapshot('fourth', ['third'], [])
- builder.finish_series()
- local = builder.get_branch()
- local = branch.Branch.open(self.get_vfs_only_url('local'))
- # Initial push of three revisions
- remote_bzrdir = local.bzrdir.sprout(
- self.get_url('remote'), revision_id='third')
- remote = remote_bzrdir.open_branch()
- # Push fourth revision
- self.reset_smart_call_log()
- self.disableOptimisticGetParentMap()
- self.assertFalse(local.is_locked())
- local.push(remote)
- hpss_call_names = [item.call.method for item in self.hpss_calls]
- self.assertTrue('Repository.insert_stream_1.19' in hpss_call_names)
- insert_stream_idx = hpss_call_names.index(
- 'Repository.insert_stream_1.19')
- calls_after_insert_stream = hpss_call_names[insert_stream_idx:]
- # After inserting the stream the client has no reason to query the
- # remote graph any further.
- self.assertEqual(
- ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
- 'get', 'Branch.set_last_revision_info', 'Branch.unlock'],
- calls_after_insert_stream)
-
- def disableOptimisticGetParentMap(self):
- # Tweak some class variables to stop remote get_parent_map calls asking
- # for or receiving more data than the caller asked for.
- self.overrideAttr(repository.InterRepository,
- '_walk_to_common_revisions_batch_size', 1)
- self.overrideAttr(_mod_smart_repo.SmartServerRepositoryGetParentMap,
- 'no_extra_results', True)
-
class TestPushHook(per_branch.TestCaseWithBranch):
More information about the bazaar-commits
mailing list