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

Add support for AsyncDisposable cleanup #1288

Conversation

engyebrahim
Copy link
Member

fix: #1164

@Evangelink Evangelink changed the title Call asyncDispose func for AsyncDisposable classes Add support for AsyncDisposable cleanup Sep 28, 2022
Copy link
Member

@Evangelink Evangelink left a comment

Choose a reason for hiding this comment

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

That's a super good work @engyebrahim!

A few extra comments:

  • Try to have a more "functional" title to your PRs so that it's easier to understand what PR is bringing without having to look at the implementation.

  • The implementation with dummies and static Func/Action is a good idea but we need to be careful with them! If we add a new test reusing the dummy and the two tests are executed in parallel we might have test failure because the actual body was changed by another test. I need to investigate if we could do something similar to roslyn/roslyn-analyzers where we would compile classes on the fly and execute the content.

@Evangelink Evangelink enabled auto-merge (squash) October 6, 2022 08:05
@Evangelink Evangelink merged commit a2f50b2 into microsoft:main Oct 6, 2022
@abatishchev
Copy link

Can you please update the docs with an example of what has been made possible?

@Evangelink
Copy link
Member

@abatishchev Sure! May I ask which doc you are referring to?

@abatishchev
Copy link

@Evangelink that's what I'm looking for, any doc that would shed light on the new feature. The release notes only point to this issue. I couldn't find a sample or anything like that.

@Evangelink
Copy link
Member

Yeah right. I will add that to my TODOs, current docs for mstest are pretty poor and outdated.

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 Classes should support IAsyncDisposable in addition to IDisposable.
3 participants