Skip to content

Commit cc68c66

Browse files
committed
tests: fix flaxy TestCloseRunningCommand test
Looks like this test was failing due to bad syntax on the `while` loop, which caused it to die after 1 second. If the test took a bit longer, the process would be dead before the following assertions run, causing the test to fail/be flaky. Signed-off-by: Laura Brehm <[email protected]>
1 parent 482bf86 commit cc68c66

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cli/connhelper/commandconn/commandconn_unix_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ func TestCloseRunningCommand(t *testing.T) {
4848
defer close(done)
4949

5050
go func() {
51-
c, err := New(ctx, "sh", "-c", "while true; sleep 1; done")
51+
c, err := New(ctx, "sh", "-c", "while true; do sleep 1; done")
5252
assert.NilError(t, err)
5353
cmdConn := c.(*commandConn)
5454
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))

0 commit comments

Comments
 (0)