Skip to content

Commit e9aee87

Browse files
committed
pythonGH-110796: fix intermittent test failure in test_current_exceptions
Signed-off-by: Filipe Laíns <[email protected]>
1 parent b883cad commit e9aee87

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Lib/test/test_sys.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ def test_current_exceptions(self):
511511
# Spawn a thread that blocks at a known place. Then the main
512512
# thread does sys._current_frames(), and verifies that the frames
513513
# returned make sense.
514-
entered_g = threading.Event()
514+
g_raised = threading.Event()
515515
leave_g = threading.Event()
516516
thread_info = [] # the thread's id
517517

@@ -520,17 +520,17 @@ def f123():
520520

521521
def g456():
522522
thread_info.append(threading.get_ident())
523-
entered_g.set()
524523
while True:
525524
try:
526525
raise ValueError("oops")
527526
except ValueError:
527+
g_raised.set()
528528
if leave_g.wait(timeout=support.LONG_TIMEOUT):
529529
break
530530

531531
t = threading.Thread(target=f123)
532532
t.start()
533-
entered_g.wait()
533+
g_raised.wait(timeout=support.LONG_TIMEOUT)
534534

535535
try:
536536
# At this point, t has finished its entered_g.set(), although it's

0 commit comments

Comments
 (0)