visual studio - Forcing MSTest to use a single thread -


given test fixture:

[testclass] public class mstestthreads {     [testmethod]     public void test1()     {         trace.writeline(thread.currentthread.managedthreadid);     }      [testmethod]     public void test2()     {         trace.writeline(thread.currentthread.managedthreadid);     } } 

running test mstest through visual studio or command line prints 2 different thread numbers (yet run sequentially anyway).

is there way force mstest run them using single thread?

i've fought endless hours make mstest run in single threaded mode on large project made heavy use of nhibernate , it's not-thread-safe (not problem, it's not) isession.

we ended more time writing code support multi-threaded nature of mstest because -to best of , teams knowledge - not possible run mstest in single threaded mode.


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -