Use try-finally block
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Integration/WabiSabiHttpApiIntegrationTests.cs
@@ -138,6 +138,8 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Integration
int expectedInputNumber = NumberOfParticipants * NumberOfCoinsPerParticipant;
var node = await TestNodeBuilder.CreateForHeavyConcurrencyAsync();
+ try
+ {
var rpc = node.RpcClient;
var httpClient = _apiApplicationFactory.WithWebHostBuilder(builder =>
@@ -196,8 +198,12 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Integration
Assert.True(coinjoin.Outputs.Count >= expectedInputNumber);
Assert.True(coinjoin.Inputs.Count == expectedInputNumber);
+ }
+ finally
+ {
await node.TryStopAsync();
}
+ }
[Fact]
public async Task RegisterCoinAsync()

Use try-finally block