Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

turn off socket timeout in test_xmlrpc #45714

Closed
hupp mannequin opened this issue Nov 2, 2007 · 2 comments
Closed

turn off socket timeout in test_xmlrpc #45714

hupp mannequin opened this issue Nov 2, 2007 · 2 comments
Labels
tests Tests in the Lib/test dir

Comments

@hupp
Copy link
Mannequin

hupp mannequin commented Nov 2, 2007

BPO 1373
Nosy @gvanrossum
Files
  • xmlrpc_nonblock.patch
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2007-11-02.16:10:16.199>
    created_at = <Date 2007-11-02.12:46:28.528>
    labels = ['tests']
    title = 'turn off socket timeout in test_xmlrpc'
    updated_at = <Date 2008-01-06.22:29:45.435>
    user = 'https://bugs.python.org/hupp'

    bugs.python.org fields:

    activity = <Date 2008-01-06.22:29:45.435>
    actor = 'admin'
    assignee = 'none'
    closed = True
    closed_date = <Date 2007-11-02.16:10:16.199>
    closer = 'gvanrossum'
    components = ['Tests']
    creation = <Date 2007-11-02.12:46:28.528>
    creator = 'hupp'
    dependencies = []
    files = ['8677']
    hgrepos = []
    issue_num = 1373
    keywords = ['patch']
    message_count = 2.0
    messages = ['57048', '57053']
    nosy_count = 2.0
    nosy_names = ['gvanrossum', 'hupp']
    pr_nums = []
    priority = 'normal'
    resolution = 'accepted'
    stage = None
    status = 'closed'
    superseder = None
    type = None
    url = 'https://bugs.python.org/issue1373'
    versions = ['Python 3.0']

    @hupp
    Copy link
    Mannequin Author

    hupp mannequin commented Nov 2, 2007

    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

    @hupp hupp mannequin added the tests Tests in the Lib/test dir label Nov 2, 2007
    @gvanrossum
    Copy link
    Member

    Committed revision 58774.
    Thanks!!!

    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    tests Tests in the Lib/test dir
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant