-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Restrict TestDocker commands to 10 minutes of total runtime. #3350
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tstromberg The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
|
||
out, err = mk.RunWithContext(ctx, "ssh -- systemctl show docker --property=Environment --no-pager") | ||
if err != nil { | ||
t.Errorf("docker env: %v\ndocker env out: %s", err, out) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we Fatalf
instead of continuing the test?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, in this case we'd lose valuable ExecStart testing methods, and would have to employ a whack-a-mole strategy for resolving test errors.
go/go-test-comments#keep-going covers this nicely:
"Even after your test cases encounter a failure, they should keep going for as long possible in order to print out all of the failed checks in a single run. This way, someone who's fixing the failing test doesn't have to play whac-a-mole, fixing one bug and then re-running the test to find the next bug.
On a practical level, prefer calling t.Error over t.Fatal. When comparing several different properties of a function's output, use t.Error for each of those comparisions.
t.Fatal is usually only appropriate when some piece of test setup fails, without which you cannot run the test at all."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@minikube-bot OK to test |
Failure on Linux-None is known flake (kubeadm uploadconfig issue: #3196), merging |
This will make it easier to debug #3333