summaryrefslogtreecommitdiffstats
path: root/Python/thread_pthread.h
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-30 12:02:41 (GMT)
committerGitHub <noreply@github.com>2018-11-30 12:02:41 (GMT)
commitdab59fa56054d6c0f75ae7013337f7baaa248076 (patch)
treea407f556993309fffebc09816c5997b0511ddfad /Python/thread_pthread.h
parentd7a880c3c2b73415a42c8a2f900c6bc597de115d (diff)
downloadcpython-dab59fa56054d6c0f75ae7013337f7baaa248076.zip
cpython-dab59fa56054d6c0f75ae7013337f7baaa248076.tar.gz
cpython-dab59fa56054d6c0f75ae7013337f7baaa248076.tar.bz2
bpo-35347: Fix test_socket.NonBlockingTCPTests (GH-10791) (GH-10817)
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() * Add a timeout to select() in testAccept() and testRecv() * Use addCleanup() to close sockets * Use assertRaises() (cherry picked from commit ebd5d6d6e6e4e751ba9c7534004aadfc27ba9265)
Diffstat (limited to 'Python/thread_pthread.h')
0 files changed, 0 insertions, 0 deletions