diff --git a/CompatibilitySuppressions.xml b/CompatibilitySuppressions.xml new file mode 100644 index 0000000..c7e7ca8 --- /dev/null +++ b/CompatibilitySuppressions.xml @@ -0,0 +1,11 @@ + + + + + CP0001 + T:Xunit.Abstractions.TestOutputHelperExtensions + lib/net8.0/Lombiq.Tests.dll + lib/net8.0/Lombiq.Tests.dll + true + + \ No newline at end of file diff --git a/Extensions/TestOutputHelperExtensions.cs b/Extensions/TestOutputHelperExtensions.cs index 278a79d..91e0898 100644 --- a/Extensions/TestOutputHelperExtensions.cs +++ b/Extensions/TestOutputHelperExtensions.cs @@ -1,6 +1,6 @@ using Lombiq.Tests.Helpers; -namespace Xunit.Abstractions; +namespace Xunit; public static class TestOutputHelperExtensions { diff --git a/Integration/Services/TestReverseProxy.cs b/Integration/Services/TestReverseProxy.cs index 7b86346..21abff7 100644 --- a/Integration/Services/TestReverseProxy.cs +++ b/Integration/Services/TestReverseProxy.cs @@ -59,7 +59,11 @@ await httpForwarder.SendAsync( _webHost = webHostBuilder.Build(); + // This object is managed directly via its public methods and it should be only explicitly shut down and + // disposed by them. +#pragma warning disable MA0040 // Use an overload with a CancellationToken return _webHost.StartAsync(); +#pragma warning restore MA0040 // Use an overload with a CancellationToken } public Task StopAsync() @@ -74,7 +78,11 @@ public Task StopAsync() private async Task StopInternalAsync() { + // This object is managed directly via its public methods and it should be only explicitly shut down and + // disposed by them. +#pragma warning disable MA0040 // Use an overload with a CancellationToken await _webHost.StopAsync(); +#pragma warning restore MA0040 // Use an overload with a CancellationToken _webHost.Dispose(); _webHost = null; } diff --git a/Lombiq.Tests.csproj b/Lombiq.Tests.csproj index 9b5972b..4a88d30 100644 --- a/Lombiq.Tests.csproj +++ b/Lombiq.Tests.csproj @@ -27,7 +27,7 @@ - +