Skip to content

test(websocket): print the #484 oracle summary after settle(), not before - #561

Merged
FumingPower3925 merged 1 commit into
mainfrom
fix/ws-oracle-summary-after-settle
Sep 10, 2026
Merged

FumingPower3925 merged 1 commit into
mainfrom
fix/ws-oracle-summary-after-settle

Conversation

@FumingPower3925

Copy link
Copy Markdown
Contributor

The counter summary in TestBackpressureInboundSequenceIntegrity is logged immediately after wg.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=0 in 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.

…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.
@FumingPower3925
FumingPower3925 merged commit 7c6c55a into main Sep 10, 2026
10 checks passed
@FumingPower3925
FumingPower3925 deleted the fix/ws-oracle-summary-after-settle branch September 10, 2026 00:33
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