diff options
| author | Ćukasz Langa <lukasz@langa.pl> | 2023-08-24 10:08:43 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-08-24 10:08:43 (GMT) |
| commit | 459f24aef09dce122362ee2f234e97916cbf1e8d (patch) | |
| tree | a1181ffb30b55760497e7cebb233182671bcd2e2 /Lib/test/test_multiprocessing_spawn/test_threads.py | |
| parent | 9903fe1c2af17e16ceac3b2a30dac37cc2fa7463 (diff) | |
| download | cpython-459f24aef09dce122362ee2f234e97916cbf1e8d.zip cpython-459f24aef09dce122362ee2f234e97916cbf1e8d.tar.gz cpython-459f24aef09dce122362ee2f234e97916cbf1e8d.tar.bz2 | |
[3.12] gh-108342: Make ssl TestPreHandshakeClose more reliable (GH-108370) (#108404)
* In preauth tests of test_ssl, explicitly break reference cycles
invoving SingleConnectionTestServerThread to make sure that the
thread is deleted. Otherwise, the test marks the environment as
altered because the threading module sees a "dangling thread"
(SingleConnectionTestServerThread). This test leak was introduced
by the test added for the fix of issue gh-108310.
* Use support.SHORT_TIMEOUT instead of hardcoded 1.0 or 2.0 seconds
timeout.
* SingleConnectionTestServerThread.run() catchs TimeoutError
* Fix a race condition (missing synchronization) in
test_preauth_data_to_tls_client(): the server now waits until the
client connect() completed in call_after_accept().
* test_https_client_non_tls_response_ignored() calls server.join()
explicitly.
* Replace "localhost" with server.listener.getsockname()[0].
(cherry picked from commit 592bacb6fc0833336c0453e818e9b95016e9fd47)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/test_multiprocessing_spawn/test_threads.py')
0 files changed, 0 insertions, 0 deletions
