test(websocket): print the #484 oracle summary after settle(), not before - #561
Merged
Merged
Conversation
…fore The counter summary was logged immediately after wg.Wait(), while the handler goroutines were still draining. settle() runs afterwards and the assertions read the settled counters, so the two disagree on exactly the runs that matter: six runs out of twenty-four printed parseErr=0 and then failed the parse-error assertion. That is not a cosmetic ordering problem. Comparing two builds by grepping this line — which is the natural thing to do across many runs — silently reads pre-drain numbers and reports a difference that is not there. Moving the log below settle() makes the printed counters the same ones the assertions act on.
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 counter summary in
TestBackpressureInboundSequenceIntegrityis logged immediately afterwg.Wait(), while the handler goroutines are still draining.settle()runs afterwards, and the assertions read the settled counters — so the two disagree on exactly the runs that matter.In a 24-run sample, six runs printed
parseErr=0in the summary and then failed the assertion at the bottom with "frame parse error(s) observed".That is not a cosmetic ordering problem. Comparing two builds by grepping this line across many runs is the natural way to use it, and doing so silently reads pre-drain numbers. It cost me a wrong before/after table on #560.
Moving the log below
settle()makes the printed counters the same ones the assertions act on. No behaviour change to the test itself.