Skip to content

test(network): re-add Test_conn_startSending with deterministic ordering - #4434

Merged
reinkrul merged 1 commit into
masterfrom
fix/flaky-conn-test-master
Aug 19, 2026
Merged

test(network): re-add Test_conn_startSending with deterministic ordering#4434
reinkrul merged 1 commit into
masterfrom
fix/flaky-conn-test-master

Conversation

@stevenvegt

Copy link
Copy Markdown
Member

Summary

Re-adds Test_conn_startSending/disconnect_does_not_panic, which was removed in #2618 because it was flaky. The flake was one over-specified assertion: the test cancelled the stream before calling disconnect(), racing the receive goroutine (which stores the stream error as close status) against disconnect() cancelling the connection context.

Disconnecting first makes the test deterministic and restores coverage for goroutine exit and the disconnect panic guard (#1017). Companion PRs: #4432 (same re-add on V6.2), #4431 (reorder-only fix on V5.4, which still had the racy version and flaked on #4425).

Verified with go test -race -count=100: 100/100 pass.

Assisted-by: AI

The test was removed in #2618 because it was flaky: it cancelled the
stream before calling disconnect(), racing the receive goroutine
(which stores the stream error as close status) against disconnect()
cancelling the connection context. Disconnecting first guarantees the
context is cancelled before RecvMsg returns, making the test
deterministic while restoring the goroutine-exit and no-panic
coverage. Verified with -race -count=100.

Assisted-by: AI
@qltysh

qltysh Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

0 new issues

Tool Category Rule Count

@qltysh

qltysh Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Qlty


Coverage Impact

⬆️ Merging this pull request will increase total coverage on master by 0.1%.

🚦 See full report on Qlty Cloud »

🛟 Help
  • Diff Coverage: Coverage for added or modified lines of code (excludes deleted files). Learn more.

  • Total Coverage: Coverage for the whole repository, calculated as the sum of all File Coverage. Learn more.

  • File Coverage: Covered Lines divided by Covered Lines plus Missed Lines. (Excludes non-executable lines including blank lines and comments.)

    • Indirect Changes: Changes to File Coverage for files that were not modified in this PR. Learn more.

@reinkrul reinkrul added the Maintainer QoL Improves the life of Nuts maintainers label Aug 19, 2026
@reinkrul
reinkrul merged commit ef54050 into master Aug 19, 2026
13 of 14 checks passed
@reinkrul
reinkrul deleted the fix/flaky-conn-test-master branch August 19, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Maintainer QoL Improves the life of Nuts maintainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants