Dispose MongoDbFixture asynchronously.

This commit is contained in:
Denis-Cosmin Nutiu 2021-06-07 23:13:21 +03:00
parent 44c0dcf5f4
commit 80525fa4be

View file

@ -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();
}
}
}