This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Unsupported provider

classification
Title: turn off socket timeout in test_xmlrpc
Type: Stage:
Components: Tests Versions: Python 3.0
process
Status: closed Resolution: accepted
Dependencies: Superseder:
Assigned To: Nosy List: gvanrossum, hupp
Priority: normal Keywords: patch

Created on 2007-11-02 12:46 by hupp, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
xmlrpc_nonblock.patch hupp, 2007-11-02 12:46
Messages (2)
msg57048 - (view) Author: Adam Hupp (hupp) Date: 2007-11-02 12:46
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
msg57053 - (view) Author: Guido van Rossum (gvanrossum) * (Python committer) Date: 2007-11-02 16:10
Committed revision 58774.
Thanks!!!
History
Date User Action Args
2022-04-11 14:56:27adminsetgithub: 45714
2008-01-06 22:29:45adminsetkeywords: - py3k
versions: Python 3.0
2007-11-02 16:10:16gvanrossumsetstatus: open -> closed
resolution: accepted
messages: + msg57053
nosy: + gvanrossum
2007-11-02 14:00:07christian.heimessetkeywords: + py3k, patch
2007-11-02 12:46:28huppcreate