lower the timeout

pull/8265/head
Medya Gh 2020-05-24 15:20:58 -07:00
parent d4e4bbb170
commit 2cf49def09
No known key found for this signature in database
GPG Key ID: 7CF7792C6DF3245C
1 changed files with 9 additions and 2 deletions

View File

@ -155,7 +155,7 @@ func validateNodeLabels(ctx context.Context, t *testing.T, profile string) {
func validateDockerEnv(ctx context.Context, t *testing.T, profile string) {
defer PostMortemLogs(t, profile)
mctx, cancel := context.WithTimeout(ctx, Minutes(1))
mctx, cancel := context.WithTimeout(ctx, Seconds(30))
defer cancel()
var rr *RunResult
var err error
@ -167,6 +167,9 @@ func validateDockerEnv(ctx context.Context, t *testing.T, profile string) {
// we should be able to get minikube status with a bash which evaled docker-env
rr, err = Run(t, c)
}
if ctx.Err() == context.DeadlineExceeded {
t.Logf("failed to run the command in 30 seconds. exceeded 30s timeout. %s", rr.Command())
}
if err != nil {
t.Fatalf("failed to do status after eval-ing docker-env. error: %v", err)
}
@ -174,7 +177,7 @@ func validateDockerEnv(ctx context.Context, t *testing.T, profile string) {
t.Fatalf("expected status output to include 'Running' after eval docker-env but got: *%s*", rr.Output())
}
mctx, cancel = context.WithTimeout(ctx, Seconds(13))
mctx, cancel = context.WithTimeout(ctx, Seconds(30))
defer cancel()
// do a eval $(minikube -p profile docker-env) and check if we are point to docker inside minikube
if runtime.GOOS == "windows" { // testing docker-env eval in powershell
@ -185,6 +188,10 @@ func validateDockerEnv(ctx context.Context, t *testing.T, profile string) {
rr, err = Run(t, c)
}
if ctx.Err() == context.DeadlineExceeded {
t.Logf("failed to run the command in 30 seconds. exceeded 30s timeout. %s", rr.Command())
}
if err != nil {
t.Fatalf("failed to run minikube docker-env. args %q : %v ", rr.Command(), err)
}