-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Introduce timeout to prevent a hang in CancelledBuild #5290
Conversation
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.
I was so scared seeing this title, but in a test: 👍
@@ -1517,7 +1517,8 @@ public void CancelledBuild() | |||
|
|||
asyncResult.ExecuteAsync(null, null); | |||
_buildManager.CancelAllSubmissions(); | |||
asyncResult.WaitHandle.WaitOne(); | |||
asyncResult.WaitHandle.WaitOne(10000); |
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.
asyncResult.WaitHandle.WaitOne(10000); | |
asyncResult.WaitHandle.WaitOne(TimeSpan.FromSeconds(10)); |
I always prefer the explicit overload, so you don't have to remember units.
@@ -1517,7 +1517,8 @@ public void CancelledBuild() | |||
|
|||
asyncResult.ExecuteAsync(null, null); | |||
_buildManager.CancelAllSubmissions(); | |||
asyncResult.WaitHandle.WaitOne(); | |||
asyncResult.WaitHandle.WaitOne(10000); |
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.
Comment the arbitrary timeout please.
Introduce timeout to prevent a hang in CancelledBuild, which failed recently.
Introduce timeout to prevent a hang in CancelledBuild, which failed recently.
This was attempted in #5290 but we hit a hang in this test again this week.
Works towards #5229.