Merge lp:~lifeless/bzr/bug-389141 into lp:~bzr/bzr/trunk-old

Proposed by Robert Collins
Status: Merged
Approved by: John A Meinel
Approved revision: no longer in the source branch.
Merged at revision: not available
Proposed branch: lp:~lifeless/bzr/bug-389141
Merge into: lp:~bzr/bzr/trunk-old
Diff against target: 29 lines
To merge this branch: bzr merge lp:~lifeless/bzr/bug-389141
Reviewer Review Type Date Requested Status
John A Meinel Approve
Review via email: mp+10135@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Robert Collins (lifeless) wrote :

As I commented in bug 389141 this makes an expected fail test work
again, needed for 2a.

I'd like John's input specifically on this.

-Rob

--

Revision history for this message
John A Meinel (jameinel) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> Robert Collins has proposed merging lp:~lifeless/bzr/bug-389141 into lp:bzr.
>
> Requested reviews:
> bzr-core (bzr-core)
>
> As I commented in bug 389141 this makes an expected fail test work
> again, needed for 2a.
>
> I'd like John's input specifically on this.
>
> -Rob
>
>

This is changing the meaning of the test, which is why I left it at
expectedFailure. AFAICT it means that streaming from a broken source now
"works" in that we fill in the data we need.

It would be nice to have a test that errors reading from the source are
raised rather than suppressed. Having a test that says "either error or
succeed with correct data" is at least better than not having anything,
I guess.

 review: approve
 merge: approve

John
=:->

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkqFc+QACgkQJdeBCYSNAANWBwCdEWdXc6rXXC9lYqv5XlJxUocu
uJEAoM5d33ItpGrJoh0kBtUEIulz0ZKR
=iE+V
-----END PGP SIGNATURE-----

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bzrlib/tests/test_repository.py'
2--- bzrlib/tests/test_repository.py 2009-06-29 15:07:51 +0000
3+++ bzrlib/tests/test_repository.py 2009-08-15 13:36:00 +0000
4@@ -1008,14 +1008,17 @@
5 """
6 broken_repo = self.make_broken_repository()
7 empty_repo = self.make_repository('empty-repo')
8- # See bug https://bugs.launchpad.net/bzr/+bug/389141 for information
9- # about why this was turned into expectFailure
10- self.expectFailure('new Stream fetch fills in missing compression'
11- ' parents (bug #389141)',
12- self.assertRaises, (errors.RevisionNotPresent, errors.BzrCheckError),
13- empty_repo.fetch, broken_repo)
14- self.assertRaises((errors.RevisionNotPresent, errors.BzrCheckError),
15- empty_repo.fetch, broken_repo)
16+ try:
17+ empty_repo.fetch(broken_repo)
18+ except (errors.RevisionNotPresent, errors.BzrCheckError):
19+ # Test successful: compression parent not being copied leads to
20+ # error.
21+ return
22+ empty_repo.lock_read()
23+ self.addCleanup(empty_repo.unlock)
24+ text = empty_repo.texts.get_record_stream(
25+ [('file2-id', 'rev3')], 'topological', True).next()
26+ self.assertEqual('line\n', text.get_bytes_as('fulltext'))
27
28
29 class TestRepositoryPackCollection(TestCaseWithTransport):