Compare the replayed bars in ResetWorksAsExpected - #9700
Merged
Martin-Molinero merged 1 commit intoAug 14, 2026
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
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
ResetWorksAsExpected discarded a lazy Zip, so AssertConsolidatedValues never ran and only the bar counts were compared.
Related Issue
#9699
Motivation and Context
The test is the only reset coverage the 16 consolidator fixtures share. Deleting
_workingBar = null;from PeriodCountConsolidatorBase.Reset() leaves a real state leak in the base class most consolidators derive from, and on master the test still passes 17 of 17. With the comparison enumerated it fails.Three fixtures also produced no consolidated bars at all, so there was nothing to compare even once the comparison runs. OpenInterest consolidates daily and fed 11 minutes; MarketHourAware consolidates hourly and fed 11 minutes. Both now cross a period boundary. The python wrapper fixture never sets consolidated on purpose, so it declares that instead.
Requires Documentation Change
No.
How Has This Been Tested?
Putting
Assert.Failas the first line of AssertConsolidatedValues passes 17 of 17 on master, which is the bug. With this change the same planted_workingBarleak turns ResetWorksAsExpected red and reverting it turns it green.All 17 fixtures pass with the comparison running.
Full suite,
--filter "TestCategory!=TravisExclude&TestCategory!=ResearchRegressionTests": 36614 tests, 4 failures, against 3 on master. CommanCallback(Python) and ZipBytesReturnsByteArrayWithCorrectLength fail on both. The other three, ThreadSafety, DoesNotLeak and MultiThreadReadWriteTest, alternate between runs and all pass in isolation; none of them touches a consolidator.Types of changes
Checklist:
bug-<issue#>-<description>