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

Catch unhandled exception and avoid crash on test host exit #4291

Merged

Conversation

MarcoRossignoli
Copy link
Contributor

fixes #4222

@MarcoRossignoli MarcoRossignoli changed the title Catchunahndled Catch unhandled exception and avoid crash on test host exit Feb 7, 2023
[TestMethod]
public void ErrorReceivedCallbackShouldNotCrashIfInvalidProcessHandle()
{
var handleProcessHelper = new InvalidHandleProcessHelper();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe you could simply use a mock here.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah....I start to hate mocks...fakes are so simple will do.

MarcoRossignoli and others added 3 commits February 7, 2023 21:14
…nagerCallbacks.cs

Co-authored-by: Amaury Levé <amaury.leve@gmail.com>
…/TestHostManagerCallbacksTests.cs

Co-authored-by: Amaury Levé <amaury.leve@gmail.com>
…/TestHostManagerCallbacksTests.cs

Co-authored-by: Amaury Levé <amaury.leve@gmail.com>
@microsoft-github-policy-service microsoft-github-policy-service bot merged commit d804d24 into microsoft:main Feb 7, 2023
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.

Test host crashes at cleanup with COMException
2 participants