Skip to content

Commit 3304db0

Browse files
authored
fix: Agent/SessionTTY flake waiting for terminal prompt (#1002)
For an unknown reason, the prompt wouldn't appear on Windows randomly in CI. This shouldn't be a necessary check anyways, because terminal input will be buffered.
1 parent fed02cd commit 3304db0

File tree

1 file changed

+0
-3
lines changed

1 file changed

+0
-3
lines changed

agent/agent_test.go

-3
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,9 @@ func TestAgent(t *testing.T) {
6363
t.Run("SessionTTY", func(t *testing.T) {
6464
t.Parallel()
6565
session := setupSSHSession(t)
66-
prompt := "$"
6766
command := "bash"
6867
if runtime.GOOS == "windows" {
6968
command = "cmd.exe"
70-
prompt = ">"
7169
}
7270
err := session.RequestPty("xterm", 128, 128, ssh.TerminalModes{})
7371
require.NoError(t, err)
@@ -78,7 +76,6 @@ func TestAgent(t *testing.T) {
7876
session.Stdin = ptty.Input()
7977
err = session.Start(command)
8078
require.NoError(t, err)
81-
ptty.ExpectMatch(prompt)
8279
ptty.WriteLine("echo test")
8380
ptty.ExpectMatch("test")
8481
ptty.WriteLine("exit")

0 commit comments

Comments
 (0)