Skip to content

Dex Web: wait for the page-load search in the WorkQueueSearch test - #1629

Merged
longquanzheng merged 1 commit into
mainfrom
fix/web-workqueue-search-flake
Nov 11, 2026
Merged

longquanzheng merged 1 commit into
mainfrom
fix/web-workqueue-search-flake

Conversation

@longquanzheng

Copy link
Copy Markdown
Contributor

Summary

web/app/work-queue/WorkQueueSearch.test.tsx, "searches several Flow types in one request and offers all their Steps": wait until the page-load search has been sent, then assert absolute search counts (1 before submit, 2 after) instead of counts relative to a value read too early.

Why

Issue #1600. The test failed intermittently in CI on unrelated PRs (#1584, #1574) with expected 1 to be +0. Capturing the extra request's body under load showed {"flowTypes":["RefundFlow"],"filters":[]}: the page-load search, sent by useFlowSearch's passive effect, which can run after findByText returns. The test sometimes read searchesBefore as 0 and then counted the page-load search as one triggered by the checkbox. The component is correct: the checkbox changes runQuery.query.flowTypes, and the search effect follows only the applied Flow types, so no search is sent before submit.

Test-only change; no user-visible change, so no change log fragment.

Testing

  • Repeated runs of the test file: before the fix 0/50 sequential and 3/160 under 16-way parallel load (all expected 1 to be +0); after the fix 0/50 sequential and 0/320 under the same load.
  • Full Dex Web suite: 73 files, 807 tests pass. tsc --noEmit passes. (Run on Node 24, as CI uses 22/24.)

Fixes #1600

…ype test

The test read its search-count baseline before the page-load search
effect had run. Under load the effect landed later and the test counted
it as a search caused by the checkbox. Wait for that search, then assert
absolute counts.

Fixes #1600
@codecov

codecov Bot commented Nov 11, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@longquanzheng
longquanzheng merged commit 2c6a5a3 into main Nov 11, 2026
31 checks passed
@longquanzheng
longquanzheng deleted the fix/web-workqueue-search-flake branch November 11, 2026 17:16
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.

Flaky Dex Web test: WorkQueueSearch counts an extra search after a checkbox change

1 participant