Skip to content

Commit 8fe33b8

Browse files
committed
try to fix test
1 parent 331aa87 commit 8fe33b8

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

cli/ssh_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,8 @@ func TestSSH(t *testing.T) {
210210

211211
for _, pty := range ptys {
212212
pty.ExpectMatchContext(ctx, "Workspace was stopped, starting workspace to allow connecting to")
213+
}
214+
for range ptys {
213215
testutil.RequireRecvCtx(ctx, t, buildReq)
214216
}
215217
close(buildResume)
@@ -218,14 +220,12 @@ func TestSSH(t *testing.T) {
218220
for _, pty := range ptys {
219221
// Either allow the command to start the workspace or fail
220222
// due to conflict (race), in which case it retries.
221-
match := pty.ExpectRegexMatchContext(ctx, "(Waiting for the workspace agent to connect|Unable to start the workspace due to conflict, the workspace may be starting, retrying without autostart...)")
223+
match := pty.ExpectRegexMatchContext(ctx, "Waiting for the workspace agent to connect")
222224
if strings.Contains(match, "Unable to start the workspace due to conflict, the workspace may be starting, retrying without autostart...") {
223225
foundConflict++
224-
// It should retry without autostart.
225-
pty.ExpectMatchContext(ctx, "Waiting for the workspace agent to connect")
226226
}
227227
}
228-
require.Equal(t, foundConflict, 2, "expected 2 conflicts")
228+
require.Equal(t, 2, foundConflict, "expected 2 conflicts")
229229
})
230230
t.Run("RequireActiveVersion", func(t *testing.T) {
231231
t.Parallel()

0 commit comments

Comments
 (0)