Threadstatic Problem
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <E961123C01E7E94AA29163941172913E05362175@mail1.dundee.realtimeworlds.com> |
We're seeing a strange problem with some unit tests to do with NUnit's Setup and Teardown methods. The global setup and teardown (TestFixtureSetUp, TestFixtureTearDown) gets executed on the primary thread. However if the test case is run on a secondary thread the function level setup/teardown (Setup, Teardown) are called on the primary thread. This is resulting (in what looks like) a problem with a [ThreadStatic] attribute as the function level teardown can't touch it correctly because it's on a separate thread. Should the function level setup/teardown methods be called on the functions thread and not the primary? Or am I not understanding something properly (likely J) Thanks, ____________________________________________________________________ DISCLAIMER This message and any attachments contain privileged and confidential information intended for the use of the addressee named above. If you are not the intended recipient of this message, you are hereby notified that any use, dissemination, distribution or reproduction of this message is prohibited. Please note that we cannot guarantee that this message or any attachment is virus free or that it has not been intercepted and amended. The views of the author may not necessarily reflect those of Realtime Worlds Ltd. Realtime Worlds Ltd is registered in Scotland, number 225628. Registered Office: 152 West Marketgait, Dundee, DD1 1NJ. ------------------------------------------------------------------------- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Register now and save $200. Hurry, offer ends at 11:59 p.m., Monday, April 7! Use priority code J8TLD2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users