Fix #409: TestMaxSessionsRefuses deadlock #411
No reviewers
Labels
No labels
actions
bug
cli
duplicate
enhancement
fork
forum
git storage
help wanted
insights
invalid
issues
moderation
oidc
ownership transfer
packages
pr/merge protection rules
projects
pull requests
question
releases
sponsorships
tags
webhooks
wiki
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
crueber/walhub!411
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/issue-409"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Test-only fix for #409. TestMaxSessionsRefuses raced the scheduler for the single session slot and could self-deadlock on its own fake transport until the 10-minute package timeout. Changes (internal/sshd/coverage_test.go only, no production-code changes): deterministic slot-holder via captureTransport.entered wait before sess2.Run; held-session teardown (close tr.block AND sess1.Close(), joining sess1.Run); 5s own-deadline budget on every wait with named failures; sibling poll-with-deadline idiom reused, no fixed sleeps. Plus a test-hygiene decision note in docs/go/15_testing.md (law 12). Verified: go test -short -count=1, -race -short -count=1, full package -count=10, targeted -count=10 plain+race, limiter siblings -race -count=3 — all pass, no hangs; gofmt/vet clean. Fixes #409.