Skip to content

Commit

Permalink
tests: Work around a Textual deadlock
Browse files Browse the repository at this point in the history
There's a deadlock on shutdown when the pilot exits before the message
pump has quiesced, but it doesn't occur when we wait for the message
pump to become idle.

Signed-off-by: Matt Wozniski <[email protected]>
  • Loading branch information
godlygeek committed Jul 2, 2024
1 parent e7f1b32 commit f11a9e3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/unit/test_tui_reporter.py
Original file line number Diff line number Diff line change
Expand Up @@ -462,8 +462,9 @@ def on_snapshot_fetched(self, message):

# WHEN
async def run_test():
async with app.run_test():
async with app.run_test() as pilot:
await all_messages_received.wait()
await pilot.pause()

async_run(run_test())

Expand Down

0 comments on commit f11a9e3

Please sign in to comment.