From 31881a33d8aa8c9e0d5cee021ae370565195fc9a Mon Sep 17 00:00:00 2001 From: "Arash A. Sabet" Date: Wed, 28 Feb 2024 20:20:12 -0500 Subject: [PATCH 1/2] Called DIspose() in DisposeAsync() #244 --- src/Abstracts/TestBedFixture.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Abstracts/TestBedFixture.cs b/src/Abstracts/TestBedFixture.cs index abc6623..2c13261 100644 --- a/src/Abstracts/TestBedFixture.cs +++ b/src/Abstracts/TestBedFixture.cs @@ -114,7 +114,7 @@ public async ValueTask DisposeAsync() if (!_disposedAsync) { await DisposeAsyncCore(); - GC.SuppressFinalize(this); + Dispose(); _disposedAsync = true; } } From 619514d944b2e40a56abeaa79e943c6e5565b594 Mon Sep 17 00:00:00 2001 From: "Arash A. Sabet" Date: Wed, 28 Feb 2024 20:21:16 -0500 Subject: [PATCH 2/2] Addressed #243 --- src/Abstracts/TestBedFixture.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Abstracts/TestBedFixture.cs b/src/Abstracts/TestBedFixture.cs index 2c13261..bccfc5e 100644 --- a/src/Abstracts/TestBedFixture.cs +++ b/src/Abstracts/TestBedFixture.cs @@ -41,7 +41,7 @@ public IServiceProvider GetServiceProvider(ITestOutputHelper testOutputHelper) return scope.ServiceProvider.GetService(); } - public AsyncServiceScope GetAsyncScope(ITestOutputHelper testOutputHelper) + public AsyncServiceScope GetAsyncScope(ITestOutputHelper testOutputHelper) { var serviceProvider = GetServiceProvider(testOutputHelper); return serviceProvider.CreateAsyncScope();