Skip to content

Commit 183a9a3

Browse files
Github workflow sometimes fails so increased the Thread.Sleep values in the EventAggregator tests that need some delay due to the fire and forget nature of events.
1 parent 9a128aa commit 183a9a3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Tests/Conditionals.Core.Tests.Integration/Areas/Events/EventAggregatorTests.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public void DI_registered_event_handlers_should_get_called()
6363
/*
6464
* publish is fire and forget so need a delay for the handler to be created before checking, set higher than needed
6565
*/
66-
Thread.Sleep(50);
66+
Thread.Sleep(150);
6767
this.MyHandlerCallCount.Should().Be(1);
6868
}
6969

@@ -92,7 +92,7 @@ public void Should_be_able_to_pass_a_cancellation_token_to_the_event()
9292
/*
9393
* publish is fire and forget so need a delay for the handler to be created before checking, set higher than needed
9494
*/
95-
Thread.Sleep(50);
95+
Thread.Sleep(150);
9696
this.MyHandlerCallCount.Should().Be(0);
9797
this.EventHandlerCancelled = true;
9898
}
@@ -107,7 +107,7 @@ public void Trying_to_add_a_duplicate_handler_should_just_return_a_subscription_
107107
this.MyHandlerCallCount = 0;
108108
_eventAggregator.Publish(ruleEvent, CancellationToken.None);
109109

110-
Thread.Sleep(50);
110+
Thread.Sleep(150);
111111

112112
var firstCount = this.MyHandlerCallCount;
113113

0 commit comments

Comments
 (0)