Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix flaky lsp diagnostic test #76228

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2045,7 +2045,8 @@ public async Task TestWorkspaceDiagnosticsWaitsForLspTextChangesWithMultipleSour
// 1. LSP changed, which triggers immediately via the queue.
// 2. Workspace changed, which can be delayed until after the requests complete.
// To ensure the workspace changed is processed, we need to wait for all workspace events.
await testLspServer.WaitForDiagnosticsAsync();
var listenerProvider = testLspServer.TestWorkspace.GetService<IAsynchronousOperationListenerProvider>();
await listenerProvider.WaitAllDispatcherOperationAndTasksAsync(testLspServer.TestWorkspace);

// Make new requests - these requests should again wait for new changes.
resultTaskOne = RunGetWorkspacePullDiagnosticsAsync(testLspServer, useVSDiagnostics, useProgress: true, category: PullDiagnosticCategories.WorkspaceDocumentsAndProject, triggerConnectionClose: false);
Expand Down
Loading