-
-
Notifications
You must be signed in to change notification settings - Fork 95
Fix NotInParallel Order property not being respected for class-level attributes #2790
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
Merged
+66
−16
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…duler Co-authored-by: thomhurst <[email protected]>
Co-authored-by: thomhurst <[email protected]>
Copilot
AI
changed the title
[WIP] NotInParallel broken for class
Fix NotInParallel Order property not being respected for class-level attributes
Aug 6, 2025
Copilot finished work on behalf of
thomhurst
August 6, 2025 12:30
This was referenced Aug 6, 2025
This was referenced Sep 23, 2025
This was referenced Oct 1, 2025
This was referenced Oct 8, 2025
This was referenced Oct 16, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The
NotInParallelattribute'sOrderproperty was not being respected when applied to classes, causing tests to execute in incorrect order based on dependency graph topological sorting instead of the specified order.Problem
When using
NotInParallelwith differentOrdervalues on classes, tests were executing in the wrong sequence:Expected output (v0.25.21):
Actual output (v0.52.8):
Root Cause
The issue was in
TestScheduler.cswhere theExecuteNotInParallelTestsAsyncandExecuteKeyedNotInParallelTestsAsyncmethods were sorting tests by the ExecutionPlan's topological order instead of respecting theNotInParallelattribute'sOrderproperty. While the priority queue correctly sorted tests byTestPriority(which includes the constraint order), this correct ordering was being overridden by a secondary sort based on ExecutionPlan order.Solution
Modified the sorting logic in both methods to:
NotInParallelOrder property fromTestPriorityThis preserves the intended execution order while maintaining dependency ordering capabilities for tests with the same NotInParallel order value.
Verification
Manual testing confirms the fix works correctly:
Test 2 (Order 1),Test 1 (Order 2),Test 3 (Order 3)Fixes #2779.
Warning
Firewall rules blocked me from connecting to one or more addresses
I tried to connect to the following addresses, but was blocked by firewall rules:
aka.mscurl -I -sSL --retry 5 --retry-delay 2 --connect-timeout 15 REDACTED(dns block)If you need me to access, download, or install something from one of these locations, you can either:
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.