diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-04 20:11:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-04 18:11:01 +0000 |
commit | fd5428d2d19f79e439d04aec7a33a00eb17bef7c (patch) | |
tree | 3dc20a58291b4353c60ec2bf21231efd48210131 | |
parent | [3.13] gh-120041: Do not use append_to_screen when completions are visible (G... (diff) | |
download | cpython-fd5428d2d19f79e439d04aec7a33a00eb17bef7c.tar.gz cpython-fd5428d2d19f79e439d04aec7a33a00eb17bef7c.tar.bz2 cpython-fd5428d2d19f79e439d04aec7a33a00eb17bef7c.zip |
[3.13] gh-120039: Reduce expected timeout in test_siginterrupt_off (GH-120047) (#120060)
The process is expected to time out. In the refleak builds,
`support.SHORT_TIMEOUT` is often five minutes and we run the tests six
times, so test_signal was taking >30 minutes.
(cherry picked from commit d419d468ff4aaf6bc673354d0ee41b273d09dd3f)
Co-authored-by: Sam Gross <colesbury@gmail.com>
-rw-r--r-- | Lib/test/test_signal.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 61fb047caf6..591cd4177d9 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -698,7 +698,7 @@ class WakeupSocketSignalTests(unittest.TestCase): @unittest.skipUnless(hasattr(os, "pipe"), "requires os.pipe()") class SiginterruptTest(unittest.TestCase): - def readpipe_interrupted(self, interrupt): + def readpipe_interrupted(self, interrupt, timeout=support.SHORT_TIMEOUT): """Perform a read during which a signal will arrive. Return True if the read is interrupted by the signal and raises an exception. Return False if it returns normally. @@ -746,7 +746,7 @@ class SiginterruptTest(unittest.TestCase): # wait until the child process is loaded and has started first_line = process.stdout.readline() - stdout, stderr = process.communicate(timeout=support.SHORT_TIMEOUT) + stdout, stderr = process.communicate(timeout=timeout) except subprocess.TimeoutExpired: process.kill() return False @@ -777,7 +777,7 @@ class SiginterruptTest(unittest.TestCase): # If a signal handler is installed and siginterrupt is called with # a false value for the second argument, when that signal arrives, it # does not interrupt a syscall that's in progress. - interrupted = self.readpipe_interrupted(False) + interrupted = self.readpipe_interrupted(False, timeout=2) self.assertFalse(interrupted) |