-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FLAKY TESTS] Fix several flaky specs #5110
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -207,7 +207,7 @@ public void Messages_can_be_muted_from_now_on_with_using() | |
[Fact] | ||
public void Make_sure_async_works() | ||
{ | ||
_testingEventFilter.ForLogLevel(LogLevel).Expect(1, TimeSpan.FromMilliseconds(100), () => | ||
_testingEventFilter.ForLogLevel(LogLevel).Expect(1, TimeSpan.FromSeconds(2), () => | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Need to add a delay to account for GC |
||
{ | ||
Task.Delay(TimeSpan.FromMilliseconds(10)).ContinueWith(t => { LogMessage("whatever"); }); | ||
}); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -172,7 +172,7 @@ public void BackoffSupervisor_must_support_default_stopping_strategy_when_using_ | |
// TODO: use FilterException | ||
EventFilter.Exception<TestException>().Expect(1, () => | ||
{ | ||
var supervisor = Create(OnStopOptions().WithDefaultStoppingStrategy()); | ||
var supervisor = Create(OnStopOptions().WithDefaultStoppingStrategy().WithManualReset()); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If a GC happened, supervisor might be delayed and auto reset might kick in, resetting the restart counter to 0, failing the test |
||
supervisor.Tell(BackoffSupervisor.GetCurrentChild.Instance); | ||
var c1 = ExpectMsg<BackoffSupervisor.CurrentChild>().Ref; | ||
Watch(c1); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test is racy