Skip to content

fix: wait for dial goroutine to complete #10959

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Dec 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
fix: wait for dial goroutine to complete
  • Loading branch information
spikecurtis committed Nov 30, 2023
commit 45d3ee91bd3f85f81cfd7e88edd3067577240478
4 changes: 4 additions & 0 deletions cli/ssh_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -409,7 +409,9 @@ func TestSSH(t *testing.T) {
//
// To work around this, we attempt to send messages in a loop until one succeeds
success := make(chan struct{})
done := make(chan struct{})
go func() {
defer close(done)
var (
conn net.Conn
err error
Expand Down Expand Up @@ -447,6 +449,8 @@ func TestSSH(t *testing.T) {
fsn.Notify()
<-cmdDone
fsn.AssertStopped()
// wait for dial goroutine to complete
_ = testutil.RequireRecvCtx(ctx, t, done)

// wait for the remote socket to get cleaned up before retrying,
// because cleaning up the socket happens asynchronously, and we
Expand Down