-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
System.Net.Requests: Pick correct RemoteExecutor overload in test #74994
Conversation
The test was using `RemoteExecutor.Invoke(Action<string, string, string, string> method, ...)` since there is no overload that takes `Func<string, string, string, string, Task>` (only one with three strings) so we weren't awaiting the Task. Fix by removing one string parameter so it picks the correct overload. Fixes dotnet#74667
Tagging subscribers to this area: @dotnet/ncl Issue DetailsThe test was using Fix by removing one string parameter so it picks the correct overload. Fixes #74667
|
For the parent, that means the child is short-lived. It shouldn't cause a situation where the child goes missing ( This could be triggering the issue, but it is not the root cause. |
@tmds you were right, we're still seeing this on Mono in CI even after this fix so this is actually an unrelated issue. I'll disable the tests again. |
In dotnet/runtime#74994 we hit an issue because a test was inadvertently using `RemoteExecutor.Invoke(Action<string, string, string, string> method, ...)` since there was no overload that takes `Func<string, string, string, string, Task>` (only one with three strings) and that means it's becoming an async void (bad!). This PR makes sure we have a matching number of overloads that take Func with the same number of arguments as the one that takes Action. Since there was a bit of a mismatch (one overload took five arguments), I made the overloads consistent so that everyone takes five args.
The test was using
RemoteExecutor.Invoke(Action<string, string, string, string> method, ...)
since there is no overload that takesFunc<string, string, string, string, Task>
(only one with three strings) and that means it's becoming an async void.The delegate that gets invoked will return the moment the method awaits something not yet completed, so now there's a race condition, where
RemoteExecutor.Invoke
thinks all work is done, but there's still likely work running and it'll start doing all its cleanup stuff like killing child processes.Fix by removing one string parameter so it picks the correct overload. I'll also open an arcade PR to add an overload with four string arguments.
Fixes #74667