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

pkg/thread: add a simple test #914

Merged
merged 2 commits into from
Feb 3, 2022
Merged

pkg/thread: add a simple test #914

merged 2 commits into from
Feb 3, 2022

Conversation

akshayjshah
Copy link
Member

It's difficult to test all the timing conditions in Parallelize, but we
can easily test the most basic use cases.

It's difficult to test all the timing conditions in Parallelize, but we
can easily test the most basic use cases.
)

func TestParallelizeWithImmediateCancellation(t *testing.T) {
// The bulk of the code relies on subtle timing that's difficult to
Copy link
Member

Choose a reason for hiding this comment

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

Needs a t.Parallel(), im surprised lint didnt catch this

Copy link
Member Author

Choose a reason for hiding this comment

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

Sure, can do.

Copy link
Member Author

@akshayjshah akshayjshah Feb 3, 2022

Choose a reason for hiding this comment

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

I'm tempted to make one of those Xzibit memes about parallel testing for parallelize, but even reading the template confuses me.

@akshayjshah akshayjshah merged commit c9fe0aa into main Feb 3, 2022
@akshayjshah akshayjshah deleted the ajs/select branch February 3, 2022 22:10
Monirul1 pushed a commit to Monirul1/buf that referenced this pull request Apr 30, 2023
It's difficult to test all the timing conditions in Parallelize, but we
can easily test the most basic use cases.
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.

4 participants