Skip to content

Commit a75676b

Browse files
authored
[3.13] pythongh-135329: Use longer timeout in pyrepl test_repl_eio() (python#139503) (python#139507)
pythongh-135329: Use longer timeout in pyrepl test_repl_eio() (python#139503) Replace hardcoded 5 seconds with support.SHORT_TIMEOUT. Fix the following error on slow CI such as GitHub Action UBSan: test test_pyrepl failed -- Traceback (most recent call last): File "Lib/test/test_pyrepl/test_unix_console.py", line 362, in test_repl_eio _, err = proc.communicate(timeout=5) # sleep for pty to settle ~~~~~~~~~~~~~~~~^^^^^^^^^^^ File "Lib/subprocess.py", line 1219, in communicate stdout, stderr = self._communicate(input, endtime, timeout) ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^ File "Lib/subprocess.py", line 2126, in _communicate self._check_timeout(endtime, orig_timeout, stdout, stderr) ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "Lib/subprocess.py", line 1266, in _check_timeout raise TimeoutExpired( ...<2 lines>... stderr=b''.join(stderr_seq) if stderr_seq else None) subprocess.TimeoutExpired: Command '[...]' timed out after 5 seconds (cherry picked from commit c985822)
1 parent 5d589ee commit a75676b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Lib/test/test_pyrepl/test_unix_console.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
import sys
77
import unittest
88
from functools import partial
9+
from test import support
910
from test.support import os_helper
1011
from test.support import script_helper
1112

@@ -384,7 +385,8 @@ def test_repl_eio(self):
384385
self.fail("Child process failed to start properly")
385386

386387
os.kill(proc.pid, signal.SIGUSR1)
387-
_, err = proc.communicate(timeout=5) # sleep for pty to settle
388+
# sleep for pty to settle
389+
_, err = proc.communicate(timeout=support.SHORT_TIMEOUT)
388390
self.assertEqual(
389391
proc.returncode,
390392
1,

0 commit comments

Comments
 (0)