Parallel extensions and unit tests

I'm having a problem running unit tests with new parallel extensions. It
happens when app domain with the test library gets unloaded. Try running the
following simplest test:


public class Program
{

public void ParallelTest()
{
System.Threading.Parallel.Invoke(() => { });
}
}

This problem happens in both R#, TeamCity (failing the build).
When I try running the test inside NUnit GUI it also causes problems on the
second run or when you exit the program.
Is there some way the envoronment can be cleaned up to avoid this issue?
Creating custom TaskManager and then disposing it doesn't seem to do the
treak.


1 comment
Comment actions Permalink

The problem seems unavoidable whenever parallel extensions are used from app
domain which later gets unloaded. I posted the issue to MSDN forums here:
http://forums.microsoft.com/msdn/ShowPost.aspx?PostID=3571031&SiteID=1
Let see where it goes.


0

Please sign in to leave a comment.