Skip to content

Commit

Permalink
tests: fix other flaky connhelper tests
Browse files Browse the repository at this point in the history
Follow up to cc68c66 (there were more
tests with incorrect syntax).

Signed-off-by: Laura Brehm <[email protected]>
  • Loading branch information
laurazard committed Jul 24, 2024
1 parent 482bf86 commit 4a7388f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/connhelper/commandconn/commandconn_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ func (mockStdoutEOF) Close() error {

func TestCloseWhileWriting(t *testing.T) {
ctx := context.TODO()
c, err := New(ctx, "sh", "-c", "while true; sleep 1; done")
c, err := New(ctx, "sh", "-c", "while true; do sleep 1; done")
assert.NilError(t, err)
cmdConn := c.(*commandConn)
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))
Expand Down Expand Up @@ -173,7 +173,7 @@ func TestCloseWhileWriting(t *testing.T) {

func TestCloseWhileReading(t *testing.T) {
ctx := context.TODO()
c, err := New(ctx, "sh", "-c", "while true; sleep 1; done")
c, err := New(ctx, "sh", "-c", "while true; do sleep 1; done")
assert.NilError(t, err)
cmdConn := c.(*commandConn)
assert.Check(t, process.Alive(cmdConn.cmd.Process.Pid))
Expand Down

0 comments on commit 4a7388f

Please sign in to comment.