-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
avoid code duplication for disabling parallelization with xUnit #62132
Conversation
Tagging subscribers to this area: @dotnet/ncl Issue DetailsFew of the tests projects were defining: [CollectionDefinition("NoParallelTests", DisableParallelization = true)]
public partial class NoParallelTests { } I've removed the duplications, introduced a single type for it and used
|
Tagging subscribers to this area: @Anipik, @safern, @ViktorHofer Issue DetailsFew of the tests projects were defining: [CollectionDefinition("NoParallelTests", DisableParallelization = true)]
public partial class NoParallelTests { } I've removed the duplications, introduced a single type for it and used
|
c086539
to
0d9fa77
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the new cs file needs to be referenced in additional projects?
src/libraries/System.Net.Http/tests/FunctionalTests/SocketsHttpHandlerTest.Http2KeepAlivePing.cs(16,24):
error CS0103: The name 'NonParallelTestCollection' does not exist in the current context
You are right, I've fixed a build failure and tested it locally (it's not part of |
The CI has failed and it's most likely caused by:
Source: https://xunit.net/docs/shared-context#collection-fixture |
5e201bb
to
d303408
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
Few of the tests projects were defining:
I've removed the duplications, introduced a single type for it and used
nameof
instead of magic strings to make sure that compiler gives us an error if the type is not referenced in the project.