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

Update Roslyn to 4.4.0 1.22369.1 #2420

Merged
merged 14 commits into from
Jul 25, 2022
Merged
Prev Previous commit
Next Next commit
Revert "Fix race condition with multithreaded tests."
This reverts commit 579814f.
JoeRobich committed Jul 22, 2022
commit 2e0dbd9c86467da86511128ce5510f89729eaae9
18 changes: 4 additions & 14 deletions tests/OmniSharp.Roslyn.CSharp.Tests/CompletionFacts.cs
Original file line number Diff line number Diff line change
@@ -2301,12 +2301,7 @@ private OmniSharpTestHost GetImportCompletionHost()
{
var testHost = CreateOmniSharpHost(configurationData: new[] { new KeyValuePair<string, string>("RoslynExtensionsOptions:EnableImportCompletion", "true") });
testHost.AddFilesToWorkspace();
var result = Interlocked.CompareExchange(ref _completionFixture.ImportCompletionTestHost, testHost, null);
if (result != null)
{
testHost.Dispose();
testHost = result;
}
_completionFixture.ImportCompletionTestHost = testHost;
return testHost;
}
}
@@ -2324,12 +2319,7 @@ private OmniSharpTestHost GetAsyncCompletionAndImportCompletionHost()
new KeyValuePair<string, string>("RoslynExtensionsOptions:EnableAsyncCompletion", "true"),
});
testHost.AddFilesToWorkspace();
var result = Interlocked.CompareExchange(ref _completionFixture.ImportCompletionTestHost, testHost, null);
if (result != null)
{
testHost.Dispose();
testHost = result;
}
_completionFixture.ImportAndAsyncCompletionTestHost = testHost;
return testHost;
}
}
@@ -2362,8 +2352,8 @@ internal static class CompletionResponseExtensions
#nullable enable
public sealed class CompletionFixture : IDisposable
{
public OmniSharpTestHost? ImportCompletionTestHost;
public OmniSharpTestHost? ImportAndAsyncCompletionTestHost;
public OmniSharpTestHost? ImportCompletionTestHost { get; set; }
public OmniSharpTestHost? ImportAndAsyncCompletionTestHost { get; set; }

public void Dispose()
{