From f1f88179ba04d77b079c7fd3cdd6feed0bfa76e8 Mon Sep 17 00:00:00 2001 From: Tonis Tiigi Date: Mon, 10 Oct 2016 17:31:15 -0700 Subject: [PATCH] Reduce TestRunCommandWithTimeoutKilled flakiness Signed-off-by: Tonis Tiigi Upstream-commit: 797f630d2e3c9180848b1adb7fd6fa879f284165 Component: engine --- components/engine/pkg/integration/cmd/command_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/engine/pkg/integration/cmd/command_test.go b/components/engine/pkg/integration/cmd/command_test.go index 4f4174d709..f28f5de7b4 100644 --- a/components/engine/pkg/integration/cmd/command_test.go +++ b/components/engine/pkg/integration/cmd/command_test.go @@ -63,12 +63,12 @@ func TestRunCommandWithTimeoutKilled(t *testing.T) { t.Skip("Needs porting to Windows") } - command := []string{"sh", "-c", "while true ; do echo 1 ; sleep .1 ; done"} - result := RunCmd(Cmd{Command: command, Timeout: 500 * time.Millisecond}) + command := []string{"sh", "-c", "while true ; do echo 1 ; sleep .5 ; done"} + result := RunCmd(Cmd{Command: command, Timeout: 1250 * time.Millisecond}) result.Assert(t, Expected{Timeout: true}) ones := strings.Split(result.Stdout(), "\n") - assert.Equal(t, len(ones), 6) + assert.Equal(t, len(ones), 4) } func TestRunCommandWithErrors(t *testing.T) {