Skip to content

Commit

Permalink
Fix TestGracefulBuilCancel flake (GoogleContainerTools#3604)
Browse files Browse the repository at this point in the history
Ran the test 1000 times on TravisCI without issue.

Fix GoogleContainerTools#3537

Signed-off-by: David Gageot <[email protected]>
  • Loading branch information
dgageot authored and Miklos Kiss committed Feb 3, 2020
1 parent c32a20e commit 11bafe6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/skaffold/build/misc/graceful_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 11bafe6

Please sign in to comment.