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

Update Test method parameter checks to account for CancellationToken #678

Merged

Conversation

manfred-brands
Copy link
Member

Fixes #663

@mikkelbu
Copy link
Member

General comment. It seems like all the code (analyzer and tests) only checks the case where the CancelAfterAttribute is placed directly on the test-method, but I guess this attribute could also have been placed on the test fixture?

@manfred-brands
Copy link
Member Author

General comment. It seems like all the code (analyzer and tests) only checks the case where the CancelAfterAttribute is placed directly on the test-method, but I guess this attribute could also have been placed on the test fixture?

Yes. The CancelAfterAttribute is allowed on the class. Myself I don't see proper use of it, what if you add more tests, then the fixture needs more time even though all individual tests are fine.

But as NUnit supports it, I added tests and support for looking up the attribute on the class.

Copy link
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

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

+1LGTM. I'm happy to merge this when you are @manfred-brands. Thanks for the work 👍

@manfred-brands manfred-brands merged commit b0655fe into nunit:master Jan 27, 2024
6 checks passed
@manfred-brands manfred-brands deleted the issue663_CancellationToken branch January 27, 2024 19:49
@mikkelbu mikkelbu added this to the Release 4.0 milestone Jan 27, 2024
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.

NUnit1027 fired when CancellationToken and [CancelAfter] is given
2 participants