summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_socketserver.py
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2023-10-05 22:17:20 (GMT)
committerGitHub <noreply@github.com>2023-10-05 22:17:20 (GMT)
commit1b589850774e6386d7c04fd113a0879afa21f07c (patch)
treee85fc38791070efaa1044f32a699c6be822088eb /Lib/test/test_socketserver.py
parent5a4e821b436710bc9814513965ec9ad097c4adac (diff)
downloadcpython-1b589850774e6386d7c04fd113a0879afa21f07c.zip
cpython-1b589850774e6386d7c04fd113a0879afa21f07c.tar.gz
cpython-1b589850774e6386d7c04fd113a0879afa21f07c.tar.bz2
[3.12] gh-110393: Remove watchdog with hardcoded timeout (GH-110400) (#110445)
gh-110393: Remove watchdog with hardcoded timeout (GH-110400) test_builtin and test_socketserver no longer use signal.alarm() to implement a watchdog with a hardcoded timeout (2 and 60 seconds). Python test runner regrtest has two watchdogs: faulthandler and timeout on running worker processes. Tests using short hardcoded timeout can fail on slowest buildbots just because the timeout is too short. (cherry picked from commit 1328fa31fe9c72748fc6fd11d017c82aafd48a49) Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/test_socketserver.py')
-rw-r--r--Lib/test/test_socketserver.py7
1 files changed, 0 insertions, 7 deletions
diff --git a/Lib/test/test_socketserver.py b/Lib/test/test_socketserver.py
index c81d559..0f62f9e 100644
--- a/Lib/test/test_socketserver.py
+++ b/Lib/test/test_socketserver.py
@@ -32,11 +32,6 @@ requires_unix_sockets = unittest.skipUnless(HAVE_UNIX_SOCKETS,
HAVE_FORKING = test.support.has_fork_support
requires_forking = unittest.skipUnless(HAVE_FORKING, 'requires forking')
-def signal_alarm(n):
- """Call signal.alarm when it exists (i.e. not on Windows)."""
- if hasattr(signal, 'alarm'):
- signal.alarm(n)
-
# Remember real select() to avoid interferences with mocking
_real_select = select.select
@@ -68,12 +63,10 @@ class SocketServerTest(unittest.TestCase):
"""Test all socket servers."""
def setUp(self):
- signal_alarm(60) # Kill deadlocks after 60 seconds.
self.port_seed = 0
self.test_files = []
def tearDown(self):
- signal_alarm(0) # Didn't deadlock.
reap_children()
for fn in self.test_files: