Merge lp://staging/~jameinel/bzr/2.3-per-transport-tests into lp://staging/bzr
Proposed by
John A Meinel
Status: | Merged |
---|---|
Approved by: | Vincent Ladeuil |
Approved revision: | no longer in the source branch. |
Merged at revision: | 5604 |
Proposed branch: | lp://staging/~jameinel/bzr/2.3-per-transport-tests |
Merge into: | lp://staging/bzr |
Diff against target: |
72 lines (+17/-6) 2 files modified
bzrlib/tests/per_transport.py (+10/-6) doc/en/release-notes/bzr-2.3.txt (+7/-0) |
To merge this branch: | bzr merge lp://staging/~jameinel/bzr/2.3-per-transport-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Packman (community) | Approve | ||
Review via email: mp+46047@code.staging.launchpad.net |
Commit message
Use Transport.
Description of the change
I think this failure is just a race condition, where the server/etc is still holding the file open, and then we are trying to write over top of it.
I *hope* the issue is that .get().read() is not very atomic and quick at closing its file handle. So I switched to .get_bytes() which should be a bit better at knowing that it can close the handle immediately.
To post a comment you must log in.
Code changes all look right to me, am not completely clear on this hunk though:
- self.assertEqua
+ f = t.get('foo')
+ try:
+ self.assertEqua
+ finally:
+ f.close()
What's the intended effect there, that's different from two get_bytes calls or one get and two reads?
I'm not sure if this'll fix the random failures, but vila also suspects this as a potential issue in bug 681047. I'd assumed refcounts would be doing the right thing here anyway, but jam teaches me paramiko does slightly different things in __del__ from a normal close.