Skip to content

Fix one test#18072

Merged
psfinaki merged 4 commits into
dotnet:mainfrom
majocha:fix-parallel-test
Dec 4, 2024
Merged

Fix one test#18072
psfinaki merged 4 commits into
dotnet:mainfrom
majocha:fix-parallel-test

Conversation

@majocha

@majocha majocha commented Nov 27, 2024

Copy link
Copy Markdown
Contributor

Description

error on one workflow should cancel all others test` became flaky after my changes.
This became very apparent when running tests in parallel in CI.

The mistake was to rely on Async.OnCancel to detect cancellation inside the computation. This is absolutely unreliable because the computation can check for cancellation before Async.OnCancel manages to register its callback. Even inside Async.OnCancel implementation, there's a bind that will check cancellation and prevent the callback from executing.

Checklist

  • Ran locally a few thousand parallel iterations to make sure this is good.

@majocha majocha requested a review from a team as a code owner November 27, 2024 15:12
@github-actions

Copy link
Copy Markdown
Contributor

✅ No release notes required

@vzarytovskii

vzarytovskii commented Nov 27, 2024

Copy link
Copy Markdown
Member
image

^ story of my life

@majocha

majocha commented Nov 27, 2024

Copy link
Copy Markdown
Contributor Author

The failing test here is unrelated 😄 and depends on another fix here: #18074

@majocha majocha closed this Nov 28, 2024
@majocha majocha reopened this Nov 28, 2024

@psfinaki psfinaki left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great, thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants