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

test: Add test cased for failed task cancellations #1214

Merged
merged 2 commits into from
Oct 13, 2022

Conversation

JckXia
Copy link
Member

@JckXia JckXia commented Sep 29, 2022

A follow up to #1202 (comment). Adding a test for checking when a task cancellation is unsuccessful (task is already queued and executing).

Copy link
Contributor

@KevinEady KevinEady left a comment

Choose a reason for hiding this comment

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

LGTM!

@@ -117,6 +119,49 @@ class EchoWorker : public AsyncWorker {
std::string echo;
};

std::condition_variable cv;
Copy link
Member

Choose a reason for hiding this comment

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

Might be worth moving these variables to be members of FailCancelWorker instead.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yep I agree. Made new changes

@JckXia JckXia merged commit 257a52f into nodejs:main Oct 13, 2022
@JckXia JckXia deleted the add-tests-for-fail-async-cancel branch October 13, 2022 02:05
@JckXia
Copy link
Member Author

JckXia commented Oct 13, 2022

Landed as 257a52f

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.

3 participants