Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Eliminate more instances of IWorkspaceOptionsProvider #2343

Merged
merged 7 commits into from
Mar 8, 2022
Merged
Changes from 1 commit
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
9 changes: 4 additions & 5 deletions tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public Class1()
using var host = useAsyncCompletion ? GetAsyncCompletionAndImportCompletionHost() : GetImportCompletionHost();

// First completion request should kick off the task to update the completion cache.
var completions = await FindCompletionsAsync(filename, input, host);
var completions = await FindCompletionsAsync(filename, input, host, forceExpandedCompletionIndexCreation: false);
Assert.True(completions.IsIncomplete);
Assert.DoesNotContain("Guid", completions.Items.Select(c => c.TextEdit.NewText));
Assert.All(completions.Items, c => Assert.False(c.HasAfterInsertStep));
Expand All @@ -175,7 +175,7 @@ await Task.Run(async () =>
{
while (completions.IsIncomplete)
{
completions = await FindCompletionsAsync(filename, input, host);
completions = await FindCompletionsAsync(filename, input, host, forceExpandedCompletionIndexCreation: false);
JoeRobich marked this conversation as resolved.
Show resolved Hide resolved
cts.Token.ThrowIfCancellationRequested();
}
}, cts.Token);
Expand Down Expand Up @@ -2253,7 +2253,7 @@ public C()
private CompletionService GetCompletionService(OmniSharpTestHost host)
=> host.GetRequestHandler<CompletionService>(EndpointName);

protected async Task<CompletionResponse> FindCompletionsAsync(string filename, string source, OmniSharpTestHost testHost, char? triggerChar = null, TestFile[] additionalFiles = null)
protected async Task<CompletionResponse> FindCompletionsAsync(string filename, string source, OmniSharpTestHost testHost, char? triggerChar = null, TestFile[] additionalFiles = null, bool forceExpandedCompletionIndexCreation = true)
{
var testFile = new TestFile(filename, source);

Expand All @@ -2278,8 +2278,7 @@ protected async Task<CompletionResponse> FindCompletionsAsync(string filename, s

var requestHandler = GetCompletionService(testHost);

// Force the completion handler to return a complete set of results.
return await requestHandler.Handle(request, forceExpandedCompletionIndexCreation: true);
return await requestHandler.Handle(request, forceExpandedCompletionIndexCreation);
}

private async Task<CompletionResponse> FindCompletionsWithImportedAsync(string filename, string source, OmniSharpTestHost host)
Expand Down