Skip to content

Commit d23b06b

Browse files
[3.15] gh-150387: Fix hang in test_run_failed_script_live on slow buildbots (GH-150405) (#150420)
1 parent 4bdff2c commit d23b06b

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

Lib/test/test_profiling/test_sampling_profiler/test_live_collector_ui.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,7 @@ def mock_init_curses_side_effect(self, n_times, mock_self, stdscr):
835835
# still failing
836836
for _ in range(n_times):
837837
mock_self.display.simulate_input(-1)
838-
if n_times >= 500:
839-
mock_self.display.simulate_input(ord('q'))
838+
mock_self.display.simulate_input(ord('q'))
840839

841840
def test_run_failed_module_live(self):
842841
"""Test that running a existing module that fails exits with clean error."""
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Fix hang in
2+
``test.test_profiling.test_sampling_profiler.test_live_collector_ui.TestLiveModeErrors.test_run_failed_script_live``
3+
on slow buildbots. The test now always queues a final ``q`` keystroke so the
4+
live TUI loop exits even when the profiler collects enough samples to enter
5+
the post-finished input loop.

0 commit comments

Comments
 (0)