Skip to content

Run SubscriptionUtilsTests cases sequentially - #9723

Merged
Martin-Molinero merged 1 commit into
QuantConnect:masterfrom
Martin-Molinero:subscription-utils-tests-parallel-scope
Aug 19, 2026
Merged

Run SubscriptionUtilsTests cases sequentially#9723
Martin-Molinero merged 1 commit into
QuantConnect:masterfrom
Martin-Molinero:subscription-utils-tests-parallel-scope

Conversation

@Martin-Molinero

Copy link
Copy Markdown
Member

Description

SubscriptionUtilsTests is marked Parallelizable(ParallelScope.All), which runs its test cases concurrently on the shared fixture instance, while [SetUp] recreates the shared _security/_config fields per case. Concurrent cases can therefore operate on the same SubscriptionDataConfig instance: a case with price scaling enabled writes PriceScaleFactor on it mid-run, racing a sibling case's assertions — producing rare, timing-dependent failures in the PriceScale* 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

  • Fixture green (12/12); full suite unaffected.

🤖 Generated with Claude Code

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>
@Martin-Molinero
Martin-Molinero merged commit b0006b2 into QuantConnect:master Aug 19, 2026
7 of 8 checks passed
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.

1 participant