Skip to content

Commit 6175356

Browse files
authored
Merge pull request moby#27271 from tonistiigi/fix-test-timeout
Reduce TestRunCommandWithTimeoutKilled flakiness
2 parents c98571b + 797f630 commit 6175356

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

pkg/integration/cmd/command_test.go

+3-3
Original file line numberDiff line numberDiff line change
@@ -63,12 +63,12 @@ func TestRunCommandWithTimeoutKilled(t *testing.T) {
6363
t.Skip("Needs porting to Windows")
6464
}
6565

66-
command := []string{"sh", "-c", "while true ; do echo 1 ; sleep .1 ; done"}
67-
result := RunCmd(Cmd{Command: command, Timeout: 500 * time.Millisecond})
66+
command := []string{"sh", "-c", "while true ; do echo 1 ; sleep .5 ; done"}
67+
result := RunCmd(Cmd{Command: command, Timeout: 1250 * time.Millisecond})
6868
result.Assert(t, Expected{Timeout: true})
6969

7070
ones := strings.Split(result.Stdout(), "\n")
71-
assert.Equal(t, len(ones), 6)
71+
assert.Equal(t, len(ones), 4)
7272
}
7373

7474
func TestRunCommandWithErrors(t *testing.T) {

0 commit comments

Comments
 (0)