[issue1373] turn off socket timeout in test_xmlrpc

Adam Hupp report at bugs.python.org
Fri Nov 2 13:46:28 CET 2007


New submission from Adam Hupp:

The attached patch resolves the intermittent test_xmlrpc failures
reported by Neal Norwitz[0].

test_xmlrpc starts the XMLRPC server with a socket timeout.  This puts
the socket into non-blocking mode which is incompatible with the use of
socket.makefile as used by SocketServer.  To work around this the test
was specifically ignoring temporary read errors but the ignore was no
longer working.

The patch resolves this by removing the call to socket.settimeout and
the code to ignore temporary read errors.  
 
I also had to change the `numrequests' parameter in
FailingServerTestCase from 2->1.  This test case only makes a single
request per test (like the others) so numrequests=2 caused the test to hang.

[0]http://mail.python.org/pipermail/python-3000/2007-October/011073.html

----------
components: Tests
files: xmlrpc_nonblock.patch
messages: 57048
nosy: hupp
severity: normal
status: open
title: turn off socket timeout in test_xmlrpc
versions: Python 3.0
Added file: http://bugs.python.org/file8677/xmlrpc_nonblock.patch

__________________________________
Tracker <report at bugs.python.org>
<http://bugs.python.org/issue1373>
__________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xmlrpc_nonblock.patch
Type: application/octet-stream
Size: 7567 bytes
Desc: not available
Url : http://mail.python.org/pipermail/python-bugs-list/attachments/20071102/64f78236/attachment.obj 


More information about the Python-bugs-list mailing list