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

Appdomain.Unload occasionally ends up hanging the test run #225

Closed
AbhitejJohn opened this issue Jul 13, 2017 · 3 comments
Closed

Appdomain.Unload occasionally ends up hanging the test run #225

AbhitejJohn opened this issue Jul 13, 2017 · 3 comments

Comments

@AbhitejJohn
Copy link
Contributor

Description

We've seen instances where test code that isn't properly cleaned up, ends up hanging the finalizer thread when AppDomain.Unload gets called. From msdn an AD.Unload could take an indeterminate amount of time to return in cases like these. We should have some kind of a timeout for this operation so we do not hang forever which especially impacts CI runs.

Environment

Latest version of the adapter.

@codito
Copy link
Contributor

codito commented Jul 14, 2017

This issue needs to be fixed in MSTest v1 and v2.

@AbhitejJohn
Copy link
Contributor Author

We've seen this happen for users having an app.config file. Here is a workaround for such users:
Add the following startup section to the config

<configuration>
…
              <startup useLegacyV2RuntimeActivationPolicy="true">
                            <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0" />
              </startup>
…
</configuration>

@acesiddhu
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants