Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion tests/gateway/test_restart_drain.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,16 @@ async def test_restart_command_while_busy_requests_drain_without_interrupt(monke

result = await runner._handle_message(event)

assert result == t("gateway.draining", count=1)
expected = t("gateway.draining", count=1)
assert result == expected
# Guard against the silent-degradation regression in #22266: if the i18n
# catalog cannot be resolved (e.g. xdist workers losing the locales path)
# then ``t("gateway.draining", count=1)`` returns the bare key
# ``"gateway.draining"`` instead of the formatted English string, and both
# sides of the equality above would still match. Assert on the catalog
# output explicitly so a broken locale resolution fails loudly here.
assert expected != "gateway.draining"
assert "Draining" in expected and "1" in expected
running_agent.interrupt.assert_not_called()
runner.request_restart.assert_called_once_with(detached=True, via_service=False)

Expand Down