Staging
v0.8.1
https://github.com/python/cpython
Revision 365f21c2d3756a6768c5b0d479aaf5c2a568b80b authored by Miss Islington (bot) on 30 November 2018, 11:48:17 UTC, committed by GitHub on 30 November 2018, 11:48:17 UTC

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>
1 parent df738d5
History
Tip revision: 365f21c2d3756a6768c5b0d479aaf5c2a568b80b authored by Miss Islington (bot) on 30 November 2018, 11:48:17 UTC
bpo-35347: Fix test_socket.NonBlockingTCPTests (GH-10791)
Tip revision: 365f21c
File Mode Size
c-api
data
distributing
distutils
extending
faq
howto
includes
install
installing
library
reference
tools
tutorial
using
whatsnew
Makefile -rw-r--r-- 7.3 KB
README.rst -rw-r--r-- 4.3 KB
about.rst -rw-r--r-- 1.5 KB
bugs.rst -rw-r--r-- 4.2 KB
conf.py -rw-r--r-- 6.1 KB
contents.rst -rw-r--r-- 538 bytes
copyright.rst -rw-r--r-- 451 bytes
docutils.conf -rw-r--r-- 56 bytes
glossary.rst -rw-r--r-- 51.4 KB
license.rst -rw-r--r-- 43.4 KB
make.bat -rw-r--r-- 5.2 KB

README.rst

back to top