Skip to content

Commit

Permalink
test: fix inconsistent test for SUCCEEDED session action logging (#434)
Browse files Browse the repository at this point in the history
Signed-off-by: Josh Usiskin <[email protected]>
  • Loading branch information
jusiskin authored Oct 9, 2024
1 parent 874251f commit f1580b1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions test/unit/sessions/test_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -1593,6 +1593,10 @@ def test_logs_succeeded(
action_status=success_action_status,
now=action_complete_time,
)
# This because the _action_update_impl submits a future to this thread pool executor
# The test assertion depends on this future completing and so there's a race condition
# if we do not wait for the thread pool to shutdown and all futures to complete.
session._executor.shutdown()

# THEN
mock_mod_logger.info.assert_called_once()
Expand Down

0 comments on commit f1580b1

Please sign in to comment.