From 80525fa4be8febdb1649403020fcba8aeca3eff7 Mon Sep 17 00:00:00 2001 From: Denis Nutiu Date: Mon, 7 Jun 2021 23:13:21 +0300 Subject: [PATCH] Dispose MongoDbFixture asynchronously. --- .../Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs index d5a9ee5..94517c5 100644 --- a/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs +++ b/Retroactiune.IntegrationTests/Retroactiune.WebAPI/Fixtures/MongoDbFixture.cs @@ -8,7 +8,7 @@ using Retroactiune.Settings; namespace Retroactiune.IntegrationTests.Retroactiune.WebAPI.Fixtures { - public class MongoDbFixture : IDisposable + public class MongoDbFixture : IAsyncDisposable { private IMongoDbSettings _settings; public IMongoDatabase Database { get; } @@ -34,10 +34,9 @@ namespace Retroactiune.IntegrationTests.Retroactiune.WebAPI.Fixtures }); } - - public void Dispose() + public async ValueTask DisposeAsync() { - DropAsync().GetAwaiter().GetResult(); + await DropAsync(); } } } \ No newline at end of file