File tree Expand file tree Collapse file tree 1 file changed +4
-8
lines changed Expand file tree Collapse file tree 1 file changed +4
-8
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,19 +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- # 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
519+ NUM_OBJECTS = 100
520+ NUM_THREADS = 2
525521
526522 # Test the sys._current_frames and sys._current_exceptions calls
527523 pid = os .fork ()
528524 if pid : # parent process
529525 try :
530- support .wait_process (pid , exitcode = 0 , timeout = TIMEOUT )
526+ support .wait_process (pid , exitcode = 0 , timeout = support . SHORT_TIMEOUT )
531527 except KeyboardInterrupt :
532528 # When pressing CTRL-C kill the deadlocked process
533529 os .kill (pid , signal .SIGTERM )
You can’t perform that action at this time.
0 commit comments