Bug
test_restart_command_while_busy_requests_drain_without_interrupt in tests/gateway/test_restart_drain.py fails on main:
FAILED tests/gateway/test_restart_drain.py::test_restart_command_while_busy_requests_drain_without_interrupt
- ⏳ Draining 1 active agent(s) before restart...
+ gateway.draining
Root Cause
The test asserts against a hardcoded string ("⏳ Draining 1 active agent(s) before restart..."), but gateway/run.py was migrated to use the i18n system: t("gateway.draining", count=count).
In the xdist test environment, t() may return the raw key ("gateway.draining") instead of the localized string if the locale catalog at locales/en.yaml is not resolved from the worker's import path.
Fix
Assert against t("gateway.draining", count=1) instead of the hardcoded string. This produces the correct expected value regardless of locale resolution in the test environment.
Bug
test_restart_command_while_busy_requests_drain_without_interruptintests/gateway/test_restart_drain.pyfails on main:Root Cause
The test asserts against a hardcoded string (
"⏳ Draining 1 active agent(s) before restart..."), butgateway/run.pywas migrated to use the i18n system:t("gateway.draining", count=count).In the xdist test environment,
t()may return the raw key ("gateway.draining") instead of the localized string if the locale catalog atlocales/en.yamlis not resolved from the worker's import path.Fix
Assert against
t("gateway.draining", count=1)instead of the hardcoded string. This produces the correct expected value regardless of locale resolution in the test environment.