Skip to content

Commit

Permalink
harden GraphStageTimersSpec (#5267)
Browse files Browse the repository at this point in the history
Timings were too closely fitted with the timers programmed inside the `TestStage` - added margins to allow for less-than-perfect clock resolution.
  • Loading branch information
Aaronontheweb authored Sep 6, 2021
1 parent e692f5f commit 0481fc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/Akka.Streams.Tests/Dsl/GraphStageTimersSpec.cs
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@ public void GraphStage_timer_support_must_correctly_cancel_a_named_timer()
{
var driver = SetupIsolatedStage();
driver.Tell(TestCancelTimer.Instance);
Within(TimeSpan.FromMilliseconds(500), () => ExpectMsg<TestCancelTimerAck>());
Within(TimeSpan.FromMilliseconds(300), TimeSpan.FromSeconds(1), () => ExpectMsg(new Tick(1)));
Within(TimeSpan.FromMilliseconds(5000), () => ExpectMsg<TestCancelTimerAck>());
Within(TimeSpan.FromMilliseconds(200), TimeSpan.FromSeconds(3000), () => ExpectMsg(new Tick(1)));
ExpectNoMsg(TimeSpan.FromSeconds(1));
driver.StopStage();
}
Expand Down

0 comments on commit 0481fc8

Please sign in to comment.