-
Notifications
You must be signed in to change notification settings - Fork 38.7k
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
Prevent from future leaks of goroutines in integration tests #111444
Prevent from future leaks of goroutines in integration tests #111444
Conversation
@wojtek-t: This issue is currently awaiting triage. If a SIG or subproject determines this is a relevant issue, they will accept it by applying the The Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: wojtek-t 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 |
test/integration/framework/etcd.go
Outdated
klog.Fatalf("unexpected number of goroutines: before: %d after %d", before, after) | ||
os.Exit(result) |
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.
if we use fatal I think that we never reach os.Exit
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.
the os.Exit(result) should go out of the err!=nil block, if not error return the result
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.
Sure - put that in the wrong place. Fixed.
4f8f1ef
to
ef607d1
Compare
@aojea - PTAL |
// But we keep the limit higher to account for cpu-starved environments. | ||
if err := wait.Poll(100*time.Millisecond, 5*time.Second, checkNumberOfGoroutines); err != nil { | ||
after := runtime.NumGoroutine() | ||
klog.Fatalf("unexpected number of goroutines: before: %d after %d", before, after) |
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.
// Fatal logs to the FATAL, ERROR, WARNING, and INFO logs,
// prints stack trace(s), then calls OsExit(255).
I think that this is safe
/lgtm let's go |
/retest |
The Kubernetes project has merge-blocking tests that are currently too flaky to consistently pass. This bot retests PRs for certain kubernetes repos according to the following rules:
You can:
/retest |
Ref #108483
/kind cleanup
/sig testing
/priority important-soon