Skip to content

Fix AuthStateAsyncReturnsUnrelatedCancelledTask_TreatAsFailure flake #20881

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

Merged
merged 1 commit into from
Apr 17, 2020

Conversation

captainsafia
Copy link
Member

This PR contains a fix for a flaky test that was recently quarantined.

The AuthenticationStateChanged handler is not guaranteed to be run by the time we reach the Assert.Equal(1, authenticationStateChangedCount); that sporadically fails in some builds.

To resolve this, I used a combination of of a timeout and a new TCS to ensure that the handler was invoked before asserting. Thanks to @pranavkm for pointing me to this pattern.

Addresses #19940

@captainsafia captainsafia added test-failure area-blazor Includes: Blazor, Razor Components labels Apr 15, 2020
Copy link
Contributor

@pranavkm pranavkm left a comment

Choose a reason for hiding this comment

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

I would have @SteveSandersonMS look at this before this goes in. He's got the most context here.

@pranavkm pranavkm added this to the 5.0.0-preview4 milestone Apr 15, 2020
Copy link
Member

@javiercn javiercn left a comment

Choose a reason for hiding this comment

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

Fix seems legit

@captainsafia captainsafia force-pushed the safia/head-and-shoulders branch from ebe7cef to a608981 Compare April 16, 2020 16:29
Copy link
Member

@SteveSandersonMS SteveSandersonMS left a comment

Choose a reason for hiding this comment

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

Superb!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-blazor Includes: Blazor, Razor Components test-failure
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants