Skip to content
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

Handle InvalidOperationException when accessing process ID #3250

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

Evangelink
Copy link
Member

Got some exception in our testing suite:

Unhandled Exception: System.InvalidOperationException: No process is associated with this object.
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.EnsureState(State state)
   at System.Diagnostics.Process.get_Id()
   at Microsoft.Testing.Platform.Hosts.TestHostControllersTestHost.<InternalRunAsync>b__21_0(Object sender, EventArgs e)
   at System.Diagnostics.Process.OnExited()
   at System.Diagnostics.Process.RaiseOnExited()
   at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
   at System.Threading._ThreadPoolWaitOrTimerCallback.PerformWaitOrTimerCallback(Object state, Boolean timedOut)

@MarcoRossignoli MarcoRossignoli enabled auto-merge (squash) July 11, 2024 12:36
@MarcoRossignoli MarcoRossignoli merged commit 00d8e35 into microsoft:main Jul 11, 2024
6 checks passed
@Evangelink Evangelink deleted the fix-pid branch July 11, 2024 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants