studio: fix tests turning main CI red/flaky (kill-process, install overrides, UI re-login) (#6419)
* studio: set _stats_logger in kill-process test backend #6377 added a self._stats_logger cleanup step to _kill_process's finally block. test_kill_process_records_timestamp_on_actual_kill (added in #6400) builds the backend via __new__, which bypasses __init__ where _stats_logger is set, so once both landed on main the test raised AttributeError: 'LlamaCppBackend' object has no attribute '_stats_logger'. Set _stats_logger on the hand-built backend, mirroring __init__, so the kill path's finally has the attribute it expects. * test: assert torchao override step on normal Linux, not overrides.txt #6400 moved the torchao dependency override from a fixed pin in overrides.txt to a torch-matched spec installed via --force-reinstall (_select_torchao_spec), and turned overrides.txt into a comment-only pointer. It updated the Windows variant (test_windows_only_includes_overrides) to check for --reinstall, but left test_normal_linux_includes_overrides asserting overrides.txt is installed, which no longer happens. Check for the override step (--reinstall) instead, matching the Windows test. * test(ui): tolerate ERR_ABORTED on /login re-login in shutdown step The Shutdown step re-logs in after a CLI password rotation that revoked the prior token. The SPA auth guard can client-side-redirect mid-navigation against the stale token, aborting page.goto("/login") with net::ERR_ABORTED. It is a race (passes on main most of the time). Resolve on domcontentloaded and tolerate the abort, relying on the password-field wait that follows to confirm we reached /login, matching the wait_until used by the other navigations in this file.
This commit is contained in:
parent
6c02af8618
commit
79b57fe038
3 changed files with 19 additions and 5 deletions
|
|
@ -471,11 +471,15 @@ class TestInstallPythonStackSubprocessMock:
|
|||
# -- Normal Linux path (NO_TORCH=False, IS_MACOS=False, IS_WINDOWS=False) --
|
||||
|
||||
def test_normal_linux_includes_overrides(self):
|
||||
"""Normal Linux: overrides.txt IS called."""
|
||||
"""Normal Linux: the torchao override step IS called.
|
||||
|
||||
The override step installs a torch-matched torchao spec via
|
||||
--force-reinstall (uv: --reinstall), not overrides.txt directly.
|
||||
"""
|
||||
cmds = self._capture_install(no_torch = False, is_macos = False, is_windows = False)
|
||||
assert self._cmds_contain_file(
|
||||
cmds, "overrides.txt"
|
||||
), "overrides.txt should be called on normal Linux"
|
||||
assert any(
|
||||
"--reinstall" in cmd for cmd in cmds
|
||||
), "torchao override step (--reinstall) should be called on normal Linux"
|
||||
|
||||
def test_normal_linux_includes_triton(self):
|
||||
"""Normal Linux: triton-kernels.txt IS called."""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue