Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda37654

Browse files
authored
fix: stop waiting for Agent in a goroutine in ssh test (#12268)
Fixes race seen here:https://github.com/coder/coder/runs/21852483781What happens is that the agent connects, completes the test, and then disconnects before the Eventually condition runs. The waiter then times out because it's looking for a connected agent.Then, since it's a `require` in a goroutine, that causes the `tGo` cleanup to hang and the whole test suite to timeout after 10 minutes.Anyway, `agenttest.New` doesn't block, and we don't actually need to wait for the agent to connect, since a successful SSH session is evidence that it connected.
1 parenta31a05e commitda37654

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

‎cli/ssh_test.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -455,12 +455,9 @@ func TestSSH(t *testing.T) {
455455
assert.NoError(t,err)
456456
})
457457

458-
tGo(t,func() {
459-
// When the agent connects, the workspace was started, and we should
460-
// have access to the shell.
461-
_=agenttest.New(t,client.URL,authToken)
462-
coderdtest.NewWorkspaceAgentWaiter(t,client,workspace.ID).Wait()
463-
})
458+
// When the agent connects, the workspace was started, and we should
459+
// have access to the shell.
460+
_=agenttest.New(t,client.URL,authToken)
464461

465462
conn,channels,requests,err:=ssh.NewClientConn(&stdioConn{
466463
Reader:proxyCommandStdoutR,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp