test: stop guessing how far a scan gets before you stop it - #52
Merged
Conversation
The spec started a scan over the whole range one register at a time, checked five fields were disabled, stopped it, and then asserted that address 26 had not been reached. That last part is a guess about how fast the machine is: 26 registers with a 5ms pause each is a few hundred milliseconds, about what those five assertions cost. macOS Intel got there first and the test failed for being right. What stopping means is that no more rows arrive, so that is what it waits to see now: the count when it stopped, again a second later.
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.
The matrix on
maincame back green on four runners and red on macOS Intel, in the packaged half, on one test.11-scan-registers.spec.tsstarts a scan over the whole range one register at a time, checks that five fields are disabled, stops it, and then asserts that address 26 has not been reached yet:That last assertion is a guess about how fast the machine is. The scan walks one register at a time with a 5ms pause, so 26 of them take a few hundred milliseconds, which is about what those five assertions cost. The fastest runner got there first, and the test failed because the app was quick.
The same shape as the flat waits that came out of the hardware specs earlier today.
What stopping means is that no more rows arrive, so that is what it waits to see: the row count at the moment it stopped, and the same count a second later. Nothing in that depends on the machine.
Local: the spec passes at 30. The matrix runs on this branch.