Merge lp:~lifeless/bzr/loomsupport into lp:bzr

Proposed by Robert Collins
Status: Merged
Approved by: Robert Collins
Approved revision: no longer in the source branch.
Merged at revision: 5335
Proposed branch: lp:~lifeless/bzr/loomsupport
Merge into: lp:bzr
Diff against target: 62 lines (+0/-53)
1 file modified
bzrlib/tests/per_branch/test_push.py (+0/-53)
To merge this branch: bzr merge lp:~lifeless/bzr/loomsupport
Reviewer Review Type Date Requested Status
Martin Packman (community) Approve
bzr-core Pending
Review via email: mp+29139@code.launchpad.net

Commit message

Remove duplicate test get_parent_map_after_insert_stream.

Description of the change

Remove duplicate test get_parent_map_after_insert_stream. Makes loom
happier and the duplication isn't useful.

To post a comment you must log in.
Revision history for this message
Martin Packman (gz) wrote :

Test is also in per_interbranch which should apparently cover it.

review: Approve
Revision history for this message
Robert Collins (lifeless) wrote :

sent to pqm by email

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bzrlib/tests/per_branch/test_push.py'
--- bzrlib/tests/per_branch/test_push.py 2010-02-23 07:43:11 +0000
+++ bzrlib/tests/per_branch/test_push.py 2010-07-04 22:48:29 +0000
@@ -231,59 +231,6 @@
231 trunk.push(remote_branch)231 trunk.push(remote_branch)
232 check.check_dwim(remote_branch.base, False, True, True)232 check.check_dwim(remote_branch.base, False, True, True)
233233
234 def test_no_get_parent_map_after_insert_stream(self):
235 # Effort test for bug 331823
236 self.setup_smart_server_with_call_log()
237 # Make a local branch with four revisions. Four revisions because:
238 # one to push, one there for _walk_to_common_revisions to find, one we
239 # don't want to access, one for luck :)
240 if isinstance(self.branch_format, branch.BranchReferenceFormat):
241 # This test could in principle apply to BranchReferenceFormat, but
242 # make_branch_builder doesn't support it.
243 raise tests.TestSkipped(
244 "BranchBuilder can't make reference branches.")
245 try:
246 builder = self.make_branch_builder('local')
247 except (errors.TransportNotPossible, errors.UninitializableFormat):
248 raise tests.TestNotApplicable('format not directly constructable')
249 builder.start_series()
250 builder.build_snapshot('first', None, [
251 ('add', ('', 'root-id', 'directory', ''))])
252 builder.build_snapshot('second', ['first'], [])
253 builder.build_snapshot('third', ['second'], [])
254 builder.build_snapshot('fourth', ['third'], [])
255 builder.finish_series()
256 local = builder.get_branch()
257 local = branch.Branch.open(self.get_vfs_only_url('local'))
258 # Initial push of three revisions
259 remote_bzrdir = local.bzrdir.sprout(
260 self.get_url('remote'), revision_id='third')
261 remote = remote_bzrdir.open_branch()
262 # Push fourth revision
263 self.reset_smart_call_log()
264 self.disableOptimisticGetParentMap()
265 self.assertFalse(local.is_locked())
266 local.push(remote)
267 hpss_call_names = [item.call.method for item in self.hpss_calls]
268 self.assertTrue('Repository.insert_stream_1.19' in hpss_call_names)
269 insert_stream_idx = hpss_call_names.index(
270 'Repository.insert_stream_1.19')
271 calls_after_insert_stream = hpss_call_names[insert_stream_idx:]
272 # After inserting the stream the client has no reason to query the
273 # remote graph any further.
274 self.assertEqual(
275 ['Repository.insert_stream_1.19', 'Repository.insert_stream_1.19',
276 'get', 'Branch.set_last_revision_info', 'Branch.unlock'],
277 calls_after_insert_stream)
278
279 def disableOptimisticGetParentMap(self):
280 # Tweak some class variables to stop remote get_parent_map calls asking
281 # for or receiving more data than the caller asked for.
282 self.overrideAttr(repository.InterRepository,
283 '_walk_to_common_revisions_batch_size', 1)
284 self.overrideAttr(_mod_smart_repo.SmartServerRepositoryGetParentMap,
285 'no_extra_results', True)
286
287234
288class TestPushHook(per_branch.TestCaseWithBranch):235class TestPushHook(per_branch.TestCaseWithBranch):
289236