Skip to content

fix(test): restart drain test fails after i18n migration #22266

@alblez

Description

@alblez

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Low — cosmetic, nice to havecomp/gatewayGateway runner, session dispatch, deliverysweeper:implemented-on-mainSweeper: behavior already present on current maintype/testTest coverage or test infrastructure

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions