From 11bafe68e2420dbbdb44603b2762f3a59463c2ac Mon Sep 17 00:00:00 2001 From: David Gageot Date: Wed, 29 Jan 2020 08:14:40 +0100 Subject: [PATCH] Fix TestGracefulBuilCancel flake (#3604) Ran the test 1000 times on TravisCI without issue. Fix #3537 Signed-off-by: David Gageot --- pkg/skaffold/build/misc/graceful_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/skaffold/build/misc/graceful_test.go b/pkg/skaffold/build/misc/graceful_test.go index 9df36628f8a..50a3cd08f9d 100644 --- a/pkg/skaffold/build/misc/graceful_test.go +++ b/pkg/skaffold/build/misc/graceful_test.go @@ -46,15 +46,15 @@ func TestGracefulBuildCancel(t *testing.T) { }, { description: "kill process after sigint", - command: "trap 'echo trap' INT; sleep 5", + command: "trap 'echo trap' INT; sleep 100", shouldErr: true, }, } for _, test := range tests { testutil.Run(t, test.description, func(t *testutil.T) { - t.Override(&gracePeriod, 100*time.Millisecond) - ctx, cancel := context.WithTimeout(context.Background(), 100*time.Millisecond) + t.Override(&gracePeriod, 200*time.Millisecond) + ctx, cancel := context.WithTimeout(context.Background(), 200*time.Millisecond) defer cancel() cmd := exec.Command("bash", "-c", test.command)