summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2018-11-30 11:51:42 (GMT)
committerGitHub <noreply@github.com>2018-11-30 11:51:42 (GMT)
commitaf7e81f71858519de8d2bafcb38fce8cca86aa0a (patch)
treebab1f35b6d09a8f84b9da559b254d95047a94ba6 /Python
parent3473ca424142cb8f1453ba802ba642060b5ce779 (diff)
downloadcpython-af7e81f71858519de8d2bafcb38fce8cca86aa0a.zip
cpython-af7e81f71858519de8d2bafcb38fce8cca86aa0a.tar.gz
cpython-af7e81f71858519de8d2bafcb38fce8cca86aa0a.tar.bz2
bpo-35347: Fix test_socket.NonBlockingTCPTests (GH-10791)
testAccept() and testRecv() of test_socket.NonBlockingTCPTests have a race condition: time.sleep() is used as a weak synchronization primitive and the tests fail randomly on slow buildbots. Use a reliable threading.Event to fix these tests. Other changes: * Replace send() with sendall() * Expect specific BlockingIOError rather than generic OSError * Add a timeout to select() in testAccept() and testRecv() * Use addCleanup() to close sockets * Use assertRaises() (cherry picked from commit ebd5d6d6e6e4e751ba9c7534004aadfc27ba9265) Co-authored-by: Victor Stinner <vstinner@redhat.com>
Diffstat (limited to 'Python')
0 files changed, 0 insertions, 0 deletions