Run SubscriptionUtilsTests cases sequentially - #9723
Merged
Martin-Molinero merged 1 commit intoAug 19, 2026
Merged
Conversation
The fixture shares '_security' and '_config' state recreated in SetUp, but was marked ParallelScope.All, which runs its test cases concurrently on the shared fixture instance: a case updating the shared config price scale factor, or replacing the fields from its SetUp, can race a sibling case mid run, producing rare flaky failures in the price scale assertions. Use ParallelScope.Fixtures like the rest of the suite, the fixture still runs in parallel with other fixtures, its cases now sequentially. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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
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.
Description
SubscriptionUtilsTestsis markedParallelizable(ParallelScope.All), which runs its test cases concurrently on the shared fixture instance, while[SetUp]recreates the shared_security/_configfields per case. Concurrent cases can therefore operate on the sameSubscriptionDataConfiginstance: a case with price scaling enabled writesPriceScaleFactoron it mid-run, racing a sibling case's assertions — producing rare, timing-dependent failures in thePriceScale*tests (e.g. a fill-forward point observed with the wrong scale).Switch the fixture to
ParallelScope.Fixtures, matching the convention used across the rest of the suite: the fixture still runs in parallel with other fixtures, but its cases run sequentially, so the shared fixture state is safe.Testing
🤖 Generated with Claude Code