From 590376760e6bbbc52c8c36acc00cb6d99e9a6e28 Mon Sep 17 00:00:00 2001 From: Priya Wadhwa Date: Fri, 29 Jan 2021 15:10:40 -0800 Subject: [PATCH] Add timeouts to cleaning up --- hack/jenkins/common.sh | 4 ++-- test/integration/pause_test.go | 4 ++-- test/integration/start_stop_delete_test.go | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/hack/jenkins/common.sh b/hack/jenkins/common.sh index 0182427673..0e4f4e4e58 100755 --- a/hack/jenkins/common.sh +++ b/hack/jenkins/common.sh @@ -393,8 +393,8 @@ if grep -q html "$HTML_OUT"; then fi echo ">> Cleaning up after ourselves ..." -${SUDO_PREFIX}${MINIKUBE_BIN} tunnel --cleanup || true -${SUDO_PREFIX}${MINIKUBE_BIN} delete --all --purge >/dev/null 2>/dev/null || true +timeout 3m ${SUDO_PREFIX}${MINIKUBE_BIN} tunnel --cleanup || true +timeout 5m ${SUDO_PREFIX}${MINIKUBE_BIN} delete --all --purge >/dev/null 2>/dev/null || true cleanup_stale_routes || true ${SUDO_PREFIX} rm -Rf "${MINIKUBE_HOME}" || true diff --git a/test/integration/pause_test.go b/test/integration/pause_test.go index 81043d4cd8..d9214bec4e 100644 --- a/test/integration/pause_test.go +++ b/test/integration/pause_test.go @@ -71,7 +71,7 @@ func TestPause(t *testing.T) { func validateFreshStart(ctx context.Context, t *testing.T, profile string) { defer PostMortemLogs(t, profile) - args := append([]string{"start", "-p", profile, "--memory=1800", "--install-addons=false", "--wait=all", "--wait-timeout=2m"}, StartArgs()...) + args := append([]string{"start", "-p", profile, "--memory=1800", "--install-addons=false", "--wait=all"}, StartArgs()...) rr, err := Run(t, exec.CommandContext(ctx, Target(), args...)) if err != nil { t.Fatalf("failed to start minikube with args: %q : %v", rr.Command(), err) @@ -82,7 +82,7 @@ func validateFreshStart(ctx context.Context, t *testing.T, profile string) { func validateStartNoReconfigure(ctx context.Context, t *testing.T, profile string) { defer PostMortemLogs(t, profile) - args := []string{"start", "-p", profile, "--alsologtostderr", "-v=1", "--wait-timeout=2m"} + args := []string{"start", "-p", profile, "--alsologtostderr", "-v=1"} args = append(args, StartArgs()...) rr, err := Run(t, exec.CommandContext(ctx, Target(), args...)) if err != nil { diff --git a/test/integration/start_stop_delete_test.go b/test/integration/start_stop_delete_test.go index c7666566c0..8154b53449 100644 --- a/test/integration/start_stop_delete_test.go +++ b/test/integration/start_stop_delete_test.go @@ -94,7 +94,7 @@ func TestStartStop(t *testing.T) { waitFlag = "--wait=apiserver,system_pods,default_sa" } - startArgs := append([]string{"start", "-p", profile, "--memory=2200", "--alsologtostderr", waitFlag, "--wait-timeout=2m"}, tc.args...) + startArgs := append([]string{"start", "-p", profile, "--memory=2200", "--alsologtostderr", waitFlag}, tc.args...) startArgs = append(startArgs, StartArgs()...) startArgs = append(startArgs, fmt.Sprintf("--kubernetes-version=%s", tc.version))