Skip to content

Commit fb34c4f

Browse files
committed
Improvement
1 parent 62ef96f commit fb34c4f

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

loadtest/reconnectingpty/run_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ func Test_Runner(t *testing.T) {
4646
require.NoError(t, err)
4747

4848
require.Contains(t, logStr, "Output:")
49-
require.Contains(t, logStr, "\thello world")
49+
// OSX: Output:\n\thello world\n
50+
// Win: Output:\n\t\x1b[2J\x1b[m\x1b[H\x1b]0;Administrator: C:\\Program Files\\PowerShell\\7\\pwsh.exe\a\x1b[?25hhello world\n
51+
require.Contains(t, logStr, "hello world\n")
5052
})
5153

5254
t.Run("NoLogOutput", func(t *testing.T) {
@@ -72,7 +74,6 @@ func Test_Runner(t *testing.T) {
7274
require.NoError(t, err)
7375

7476
require.NotContains(t, logStr, "Output:")
75-
require.NotContains(t, logStr, "\thello world")
7677
})
7778

7879
t.Run("Timeout", func(t *testing.T) {
@@ -88,7 +89,7 @@ func Test_Runner(t *testing.T) {
8889
Init: codersdk.ReconnectingPTYInit{
8990
Command: "echo 'hello world'",
9091
},
91-
Timeout: httpapi.Duration(5 * time.Second),
92+
Timeout: httpapi.Duration(2 * testutil.WaitLong),
9293
LogOutput: true,
9394
})
9495

@@ -166,7 +167,7 @@ func Test_Runner(t *testing.T) {
166167
Init: codersdk.ReconnectingPTYInit{
167168
Command: "echo 'hello world'",
168169
},
169-
Timeout: httpapi.Duration(5 * time.Second),
170+
Timeout: httpapi.Duration(2 * testutil.WaitLong),
170171
ExpectTimeout: true,
171172
LogOutput: true,
172173
})

0 commit comments

Comments
 (0)