Skip to content

Commit 2016981

Browse files
committed
Fix faulty test
1 parent 9cf02a6 commit 2016981

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

command_linux_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,7 @@ func TestCommand_WithContext(t *testing.T) {
152152
// context takes precedence over timeout
153153
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
154154
defer cancel()
155+
cmd = NewCommand("sleep 3;", WithTimeout(1*time.Second))
155156
err = cmd.ExecuteContext(ctx)
156157
assert.NotNil(t, err)
157158
assert.Equal(t, "context deadline exceeded", err.Error())

0 commit comments

Comments
 (0)