Use the simplest syntax
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/AliceTimeoutTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Backend/AliceTimeoutTests.cs
@@ -51,9 +51,15 @@ public class AliceTimeoutTests
Assert.Empty(round.Alices);
cancellationTokenSource.Cancel();
- var exc = await Assert.ThrowsAsync<Exception>(async () => await task);
+ try
+ {
+ await task;
+ }
+ catch (Exception exc)
+ {
Assert.True(exc is OperationCanceledException or WabiSabiProtocolException);
+ }
await roundStateUpdater.StopAsync(CancellationToken.None);
await arena.StopAsync(CancellationToken.None);

Use the simplest syntax