Repository navigation
Fix flaky Windows test: ProjectService sub-project re-search test's fixed sleeps - #2360
Closed
louis-johnston-db wants to merge 1 commit into
Closed
louis-johnston-db wants to merge 1 commit into
louis-johnston-db wants to merge 1 commit into
Conversation
…ixed sleeps The test now waits for what it checks instead of sleeping 20 ms twice. After the file event it waits until the second sub-project search is held, which only happens once the detection pass behind BundleFiles' and the service's debounce timers has run, so a late Windows timer can no longer make settled() return before the pass. After release it waits until the sub-projects list both folders, since the search status stays "done" during a re-search and there is nothing else to wait on. <!-- vscode-factory:item=winflake:859d3fbaa0 --> Co-authored-by: Isaac <no-reply@databricks.com>
louis-johnston-db
temporarily deployed
to
test-trigger-is
November 30, 2026 09:18 — with
GitHub Actions
Inactive
louis-johnston-db
temporarily deployed
to
test-trigger-is
November 30, 2026 09:19 — with
GitHub Actions
Inactive
louis-johnston-db
temporarily deployed
to
test-trigger-is
November 30, 2026 09:19 — with
GitHub Actions
Inactive
Contributor
Author
|
Superseded by #2364: the same change on a renamed branch. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
src/kernel/project/ProjectService.test.ts, "keeps the sub-projects it found while it searches the same folder again": the file event reaches a detection pass only after two debounce timers (BundleFiles' and the service's), which Windows can wake late. The test slept 20 ms and then calledservice.settled(), which returns at once when no pass has started yet, so it could readsearch.held()before the new search began. It now reports the event and usesvi.waitForuntil the new search is held.vi.waitForuntil the sub-projects are["nested", "other"]. The status stays"done"during a re-search of the same folder, so there is no status to wait on.Tests
yarn vitest run src/kernel/project/ProjectService.test.tsinpackages/databricks-vscode.search.held()assertion before the fix and passes with it. The repro is not part of this change.yarn oxfmtandyarn oxlint --deny-warningson the changed file.Evidence:
test-windowsruns on release/3.x and its pull requests, with Linuxtestpassing in the same runs; last seen 2026-11-22. Runs: 45052414464.src/kernel/project/ProjectService.repro.test.ts): failed 30 of 30 runs without the fix, 0 of 30 with it.yarn workspace databricks test: 3117 passed, 0 failed.yarn check: passed.This pull request and its description were written by Isaac.