Skip to content

Commit

Permalink
test flaky diagnostic test
Browse files Browse the repository at this point in the history
  • Loading branch information
dibarbet committed Dec 2, 2024
1 parent 31ac7e2 commit c6cee3c
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2009,8 +2009,9 @@ public async Task TestWorkspaceDiagnosticsWaitsForLspSolutionChanges(bool useVSD
}

[Theory, CombinatorialData]
public async Task TestWorkspaceDiagnosticsWaitsForLspTextChangesWithMultipleSources(bool useVSDiagnostics, bool mutatingLspWorkspace)
public async Task TestWorkspaceDiagnosticsWaitsForLspTextChangesWithMultipleSources(bool useVSDiagnostics, bool mutatingLspWorkspace, [CombinatorialRange(0, 5)] int iteration)
{
_ = iteration;
var markup1 =
@"class A {";
var markup2 = "";
Expand Down Expand Up @@ -2045,7 +2046,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

0 comments on commit c6cee3c

Please sign in to comment.