Skip to content

Studio tests: give the llama-server owner tests a wait cap a loaded runner can meet - #17488

Merged
danielhanchen merged 1 commit into
mainfrom
tests-llama-owner-wait-budget
Nov 11, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
tests-llama-owner-wait-budget

Conversation

@danielhanchen

@danielhanchen danielhanchen commented Nov 11, 2026 •

Copy link
Copy Markdown
Member

Summary

studio/backend/tests/test_llama_upstream_single_owner.py fails intermittently on CI under xdist on PRs that do not touch it (seen on #17486):

tests/test_llama_upstream_single_owner.py:423: in _until
E   asyncio.exceptions.CancelledError
E   TimeoutError
3 failed, 14184 passed

Every failure is the test's _until() helper giving up. It polls a predicate (the fake backend thread started, a task finished, the respawn task list drained) and allowed 1 s. On a loaded 2-core runner with xdist workers, the backend thread's next turn can come later than that, so the wait expires while the code under test is still correct.

Reproduced locally on main by pinning the file's run to one CPU with 6 xdist workers (taskset -c 0 ... -n 6): 4 failed, 49 passed, twice, all in _until.

Change

_until() now caps its wait at 15 s (_UNTIL_TIMEOUT_S). It is only a cap: the helper returns as soon as the predicate holds, so a passing run is no slower and every assertion is unchanged. A real hang still fails, just later.

Testing

  • Same single-CPU, 6-worker run with this change: 53 passed, twice.
  • Unloaded: 53 passed in 8 s, as before.

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 11, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-11T07:57:40.647631Z c6f04da Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: c6f04da022

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 9dc37ed into main Nov 11, 2026
@danielhanchen
danielhanchen deleted the tests-llama-owner-wait-budget branch November 11, 2026 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant