We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9cf02a6 commit 2016981Copy full SHA for 2016981
command_linux_test.go
@@ -152,6 +152,7 @@ func TestCommand_WithContext(t *testing.T) {
152
// context takes precedence over timeout
153
ctx, cancel := context.WithTimeout(context.Background(), 2*time.Second)
154
defer cancel()
155
+ cmd = NewCommand("sleep 3;", WithTimeout(1*time.Second))
156
err = cmd.ExecuteContext(ctx)
157
assert.NotNil(t, err)
158
assert.Equal(t, "context deadline exceeded", err.Error())
0 commit comments