Increase timeouts in UTs
MODIFY
WalletWasabi.Tests/UnitTests/WabiSabi/Models/RoundStateUpdaterTests.cs
WalletWasabi.Tests/UnitTests/WabiSabi/Models/RoundStateUpdaterTests.cs
using Moq;
-using NBitcoin;
using System;
using System.Threading;
using System.Threading.Tasks;
@@ -54,12 +53,12 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Models
// Force the RoundStatusUpdater to run. After this it will know about the existance of `round2` so,
// we can subscribe to events.
- await roundStatusUpdater.TriggerAndWaitRoundAsync(TimeSpan.FromMilliseconds(10));
+ await roundStatusUpdater.TriggerAndWaitRoundAsync(TimeSpan.FromMilliseconds(50));
var round2IRTask = roundStatusUpdater.CreateRoundAwaiter(roundState2.Id, rs => rs.Phase == Phase.InputRegistration, cancellationToken);
var round2TBTask = roundStatusUpdater.CreateRoundAwaiter(roundState2.Id, rs => rs.Phase == Phase.TransactionBroadcasting, cancellationToken);
// Force the RoundStatusUpdater to run again just to make it trigger the events.
- await roundStatusUpdater.TriggerAndWaitRoundAsync(TimeSpan.FromMilliseconds(10));
+ await roundStatusUpdater.TriggerAndWaitRoundAsync(TimeSpan.FromMilliseconds(50));
// Wait for round1 in input registration.
var round2 = await round2IRTask;
@@ -79,7 +78,7 @@ namespace WalletWasabi.Tests.UnitTests.WabiSabi.Models
// At this oint in time all the rounds have disappeared and then the awaiter that was waiting for round1 to bradcast
// the transaction has to fail to let the sleeping component that the round doesn't exist any more.
- await roundStatusUpdater.TriggerAndWaitRoundAsync(TimeSpan.FromMilliseconds(10));
+ await roundStatusUpdater.TriggerAndWaitRoundAsync(TimeSpan.FromMilliseconds(50));
var ex = await Assert.ThrowsAsync<InvalidOperationException>(async () => await round1TBTask);
Assert.Contains(round1.Id.ToString(), ex.Message);
Assert.Contains("not running", ex.Message);

Increase timeouts in UTs