Random failures on SFTPTransport tests on windows
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Bazaar |
Fix Released
|
Low
|
John A Meinel |
Bug Description
A number of SFTP tests have been randomly failing on babune over the past few months. All seem to involve PermissionError being thrown when trying to move a file. This is likely a race condition with the server or client not being careful about closing a shared file before allowing the other to continue.
Tracebacks are along the lines of:
Traceback (most recent call last):
...
File "...\bzrlib\
t.move('c', 'b')
File "...\bzrlib\
self.
File "...\bzrlib\
': unable to rename to %r' % (abs_to))
File "...\bzrlib\
self.
File "...\bzrlib\
raise errors.
PermissionDenied: Permission denied: "c": [Errno 13] Permission denied
Traceback (most recent call last):
...
File "...\bzrlib\
result = t.put_file('a', StringIO(
File "...\bzrlib\
return self._put(
File "...\bzrlib\
self.
File "...\bzrlib\
': unable to rename to %r' % (abs_to))
File "...\bzrlib\
self.
File "...\bzrlib\
raise errors.
PermissionDenied: Permission denied: "/C:/windows/
Related branches
- Martin Packman (community): Approve
-
Diff: 72 lines (+17/-6)2 files modifiedbzrlib/tests/per_transport.py (+10/-6)
doc/en/release-notes/bzr-2.3.txt (+7/-0)
Changed in bzr: | |
importance: | Undecided → Low |
status: | New → Confirmed |
Changed in bzr: | |
status: | Confirmed → In Progress |
assignee: | nobody → John A Meinel (jameinel) |
Changed in bzr: | |
status: | In Progress → Fix Released |
milestone: | none → 2.3b5 |
There is a quite suspicious:
class TransportTests( TestTransportIm plementation) :
def setUp(self):
super( TransportTests, self).setUp()
self._ captureVar( 'BZR_NO_ SMART_VFS' , None)
def check_transport _contents( self, content, transport, relpath): get(relpath) .read() == content."""
self.assertEqu alDiff( content, transport. get(relpath) .read() )
"""Check that transport.
We'd better use get_bytes() there instead of get()...