diff --git a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs index 76620c42e..1093df5b3 100644 --- a/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs +++ b/StyleCop.Analyzers/StyleCop.Analyzers.Test.CSharp9/ReadabilityRules/SA1137CSharp9UnitTests.cs @@ -3,6 +3,7 @@ namespace StyleCop.Analyzers.Test.CSharp9.ReadabilityRules { + using System.Threading; using System.Threading.Tasks; using Microsoft.CodeAnalysis.Testing; using StyleCop.Analyzers.Test.CSharp8.ReadabilityRules; @@ -51,13 +52,12 @@ int Property class MyAttribute : Attribute { } "; - var test = new CSharpTest + await new CSharpTest { ReferenceAssemblies = ReferenceAssemblies.Net.Net50, TestCode = testCode, FixedCode = fixedCode, - }; - await test.RunAsync().ConfigureAwait(false); + }.RunAsync(CancellationToken.None).ConfigureAwait(false); } } }