Repository navigation
fix(test): stop comparing document counts to a total other workers are changing - #33799
Conversation
…e changing Both header counts are system-wide totals. The test captured one before clicking a folder and compared a later read against it, so any document another worker deleted in between showed up as a failure of this test: chromium-24 read 77 before the click and 52 after, having lost 25 documents it never created. The property being tested is that the folder-view header is not scoped by the sidebar selection. Assert that directly -- it still counts the document outside the folder as well as the one inside, both of which this test created and owns -- instead of re-checking a number it does not control. The earlier comparison of the two headers to each other has the same defect, two lines up, so re-read both counts on each attempt rather than measuring one against a value captured a moment earlier. (cherry picked from commit b1f4f7d)
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Code Review ✅ Approved🟡 Medium risk · A single UI test changes polling and assertions for shared document totals. Fixes a race condition in the Context Center folder-selection test by removing comparisons against system-wide document counts that other workers modify concurrently. Instead asserts that the folder-view header remains unscoped by sidebar selection, counting both owned documents inside and outside the folder. No issues found. OptionsDisplay: compact → Counting what did not apply, without listing it. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Powered by Gitar — free for open source |
✅ Playwright Results — workflow succeededValidated commit ✅ 76 passed · ❌ 0 failed · 🟡 0 flaky · ⏭️ 0 skipped · 🧰 0 lifecycle flaky PerformanceBlocking targets: ✅ met · Optimization targets: 🟡 in progress Shard-job maxima below are not the full workflow wall time; the linked run includes build, fixture, planning, and reporting. 🕒 Full workflow signal wall (to summary) 34m 33s ⏱️ Max setup 2m 39s · max shard execution 7m 57s · max shard-job elapsed before upload 10m 58s · reporting 4s 🌐 134.97 requests/attempt · 1.59 app boots/UI scenario · 0.00% common-shard skew Optimization targets still in progress:
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Describe your changes:
Both
documents-view-file-countandfolder-view-file-countheaders are system-wide totals. The Context Center folder-selection test captured one count before clicking a folder and compared a later read against it, so any document another worker deleted in between showed up as a failure of this test.Failure evidence: chromium-24 read 77 before the click and 52 after, having lost 25 documents it never created.
The property being tested is that the folder-view header is not scoped by the sidebar selection. Assert that directly — it still counts the document outside the folder as well as the one inside, both of which this test created and owns — instead of re-checking a number it does not control.
The earlier comparison of the two headers to each other has the same defect two lines up, so re-read both counts on each poll attempt rather than measuring one against a value captured a moment earlier.
Type of change:
Notes:
Cherry-picked from #33088 (commit
b1f4f7daba) to land as a small, independently-mergeable PR. Original commit authored by @harshach. Directly addresses thechromium-17shard failure observed on the parent PR.🤖 Generated with Claude Code
The PR appears safe to merge with no actionable correctness, security, or repository-rule issues identified.
Summary
This PR stabilizes the Context Center folder-selection Playwright test by avoiding comparisons against a system-wide document count captured before concurrent workers may modify it.
Reviews (1) · Last reviewed commit: "fix(test): stop comparing document count..."