Conversation
Playwright's sync API dispatches route handlers only inside Playwright calls, so a bare time.sleep loop never runs handle_events and a POST that lands late is never recorded — the wait expires with no events observed at all. Restore the wait_for_timeout pump, which a revert of an unrelated CLI change removed along with it. Co-authored-by: Isaac <no-reply@databricks.com> Signed-off-by: harry-yao_data <harry.yao@databricks.com>
|
|
Suggest prioritising this one for review — it is currently the sole red check on four separate PRs.
It fails on the first attempt and on the lane's automatic This PR is green across all 10 E2E UI shards (44 checks, no failures), and the change is a three-line restoration of a pump that This comment was written by Isaac. |
|
Closed. If you want to pick this back up, comment |
Related issue
Summary
tests/e2e_ui/sessions/test_new_session_optimistic_title.py::test_new_session_shows_first_prompt_optimisticallyis failing on
mainright now, including on unrelated PRs:observed: []is the tell — not one event was recorded, rather than the wrong one.Playwright's sync API dispatches route handlers only inside Playwright calls. The
sanity-check loop waits on
event_texts, which is populated by an intercepted routehandler, but spins on
time.sleep(0.05)— sohandle_eventsnever runs and a POST thatlands after the loop begins is never observed. The loop then burns its full 15s and asserts
on an empty list.
This is a regression from a revert, not a new bug. The
wait_for_timeoutpump and itsexplanatory comment were added by PR #6362, and
821fa974c("revert: restore the silentomni update alias") reverted that whole commit to restore the
omni updatealias — takingthis unrelated Playwright fix with it as collateral damage. This change restores exactly
those three lines; nothing about the
omni updatealias is touched.Test Plan
E2E UI Tests (shard 3/10): the testRERUNthenFAILED,i.e. it failed both the first attempt and the lane's automatic
--reruns=1retry —consistent with a deterministic never-dispatched handler rather than a timing blip.
git show 821fa974c -- tests/e2e_ui/sessions/test_new_session_optimistic_title.pythat the revert is what removed the pump, and that the restored text matches the
pre-revert version exactly.
timeis still imported and used elsewhere in the file, so thetime.monotonic()deadline is unaffected.pre-commit run --files tests/e2e_ui/sessions/test_new_session_optimistic_title.py→ all hooks pass(including this repo's
no unconditional @pytest.mark.skiprule).E2E UI Testsshards exercise the test directly; that is the real check.Demo
Type of change
Test coverage
Coverage notes
The change is to the E2E test itself, restoring a wait that makes its own sanity assertion
observable. The test is its own coverage: it fails deterministically without the pump on the
lane's retry as well as its first attempt, and this PR's
E2E UI Testsshards run it.This pull request and its description were written by Isaac.