From c71fd5541fbac56ab02e9722e38dc7eff2322026 Mon Sep 17 00:00:00 2001 From: Steve Harter <steveharter@users.noreply.github.com> Date: Mon, 12 Aug 2024 12:52:29 -0500 Subject: [PATCH] Update dispose async test timeout and better diagnostics (#106272) --- .../tests/DI.Tests/ServiceProviderContainerTests.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs index 8bcaa9240f639..9480267307863 100644 --- a/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs +++ b/src/libraries/Microsoft.Extensions.DependencyInjection/tests/DI.Tests/ServiceProviderContainerTests.cs @@ -392,10 +392,10 @@ public void GetAsyncService_DisposeAsyncOnSameThread_ThrowsAndDoesNotHangAndDisp var service = sp.GetRequiredService<DisposeServiceProviderInCtorAsyncDisposable>(); }); }); - }).Wait(TimeSpan.FromSeconds(10)); + }).Wait(TimeSpan.FromSeconds(20)); - Assert.True(doesNotHang); - Assert.True(asyncDisposableResource.DisposeAsyncCalled); + Assert.True(doesNotHang, "!doesNotHang"); + Assert.True(asyncDisposableResource.DisposeAsyncCalled, "!DisposeAsyncCalled"); } [ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsThreadingSupported))]