Skip to content
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

Merged
merged 3 commits into from
Jun 28, 2021

Conversation

Arkatufus
Copy link
Contributor

No description provided.

@@ -310,7 +310,7 @@ public void OutputStreamSource_must_not_leave_blocked_threads()
result.ToString().Should().Be("hello");
}

[Fact]
[Fact(Skip = "Racy")]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test is racy

@@ -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), () =>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Need to add a delay to account for GC

@@ -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());
Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Copy link
Member

@Aaronontheweb Aaronontheweb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Aaronontheweb Aaronontheweb merged commit 38b7443 into akkadotnet:dev Jun 28, 2021
@Arkatufus Arkatufus deleted the RACY_fixes_1 branch February 27, 2023 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants