-
Notifications
You must be signed in to change notification settings - Fork 4.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
add closure that guarantees mutex unlock in loop #12980
add closure that guarantees mutex unlock in loop #12980
Conversation
The diff is significantly easier to see when ignoring whitespace. |
[test] |
Yeah the continue was broken. LGTM |
@@ -431,6 +431,7 @@ func (o *ObserveOptions) Run() error { | |||
go func() { | |||
<-time.After(o.exitAfterPeriod) | |||
lock.Lock() | |||
defer lock.Unlock() |
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.
This is unnecessary because we os.Exit(0). It doesn't hurt, so not an issue.
[merge] |
flaked on #12923 re[test] |
Evaluated for origin test up to 8d7e9d6 |
continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/265/) (Base Commit: 19aa349) |
flaked on #12784 (comment) re[merge] |
Evaluated for origin merge up to 8d7e9d6 |
continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pull_requests_origin_future/320/) (Base Commit: aa49370) (Image: devenv-rhel7_5932) |
Attempts to address #12930
Based on output from the linked test flake:
It is a possibility that the test is hanging for multiple hours based on a deadlock happening. This patch eliminates that possibility.
cc @openshift/cli-review @enj @smarterclayton