-
Notifications
You must be signed in to change notification settings - Fork 17
Open
Labels
💉 bugSomething isn't workingSomething isn't working
Description
I'm using xUnit v3 and an AssemblyFixture to setup my containers at startup. Everything works correctly.
Creedengo warns about a GCI93 Consider returning a Task directly instead of a single await
in both InitializeAsync
and DisposeAsync
I didn't find a way to comply.
I'm not sure if that's a false positive or something I do not know how to do properly.
This is a shortened version of it:
public sealed class AssemblyFixture : IAsyncLifetime
{
private readonly OracleContainer _oracleContainer;
private readonly RabbitMqContainer _rabbitMqContainer;
public AssemblyFixture()
{
[... Init containers...]
}
public async ValueTask DisposeAsync()
{
await Task.WhenAll(
_oracleContainer.DisposeAsync().AsTask(),
_rabbitMqContainer.DisposeAsync().AsTask()
);
}
public async ValueTask InitializeAsync()
{
await Task.WhenAll(
_oracleContainer.StartAsync(),
_rabbitMqContainer.StartAsync()
);
}
[...]
}
Thank you for your help
Metadata
Metadata
Assignees
Labels
💉 bugSomething isn't workingSomething isn't working
Type
Projects
Status
No status