File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -477,6 +477,7 @@ def g456():
477477 @threading_helper .reap_threads
478478 @threading_helper .requires_working_threading ()
479479 @support .requires_fork ()
480+ @support .requires_resource ('cpu' )
480481 def test_current_frames_exceptions_deadlock (self ):
481482 """
482483 Reproduce the bug raised in GH-106883 and GH-116969.
@@ -515,21 +516,14 @@ def thread_function(num_objects):
515516
516517 # The number of objects should be big enough to increase the
517518 # chances to call the GC.
518- NUM_OBJECTS = 1000
519- NUM_THREADS = 10
520-
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
519+ NUM_OBJECTS = 100
520+ NUM_THREADS = 2
527521
528522 # Test the sys._current_frames and sys._current_exceptions calls
529523 pid = os .fork ()
530524 if pid : # parent process
531525 try :
532- support .wait_process (pid , exitcode = 0 , timeout = TIMEOUT )
526+ support .wait_process (pid , exitcode = 0 , timeout = support . SHORT_TIMEOUT )
533527 except KeyboardInterrupt :
534528 # When pressing CTRL-C kill the deadlocked process
535529 os .kill (pid , signal .SIGTERM )
You can’t perform that action at this time.
0 commit comments