Skip to content

Commit 2bd561d

Browse files
committed
[3.11] gh-106883: Increase timeout for a test_sys test
On some platforms the test test_current_frames_exceptions_deadlock goes in timeout when CPython is built with debug. The execution time of the test is about 4x and the current timeout is not enough to complete the test.
1 parent 6b37486 commit 2bd561d

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

Lib/test/test_sys.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -518,10 +518,12 @@ def thread_function(num_objects):
518518
NUM_OBJECTS = 1000
519519
NUM_THREADS = 10
520520

521-
# 40 seconds should be enough for the test to be executed: if it
522-
# is more than 40 seconds it means that the process is in deadlock
523-
# hence the test fails
524-
TIMEOUT = 40
521+
# 160 seconds should be enough for the test to be executed: if it
522+
# is more than 160 seconds it means that the process is in deadlock
523+
# hence the test fails.
524+
# The timeout is high because on older platforms it takes some time
525+
# for the test to be executed when CPython is built with debug flags.
526+
TIMEOUT = 160
525527

526528
# Test the sys._current_frames and sys._current_exceptions calls
527529
pid = os.fork()

0 commit comments

Comments
 (0)