Re: BackgroundWorker problems
"Nassar, Anthony" <[email protected]>
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <[email protected]> |
I think I've figured out the problem. NUnit has no reason to keep your fixture class around once it's executed the small number of unit tests in it, right? So the entire AppDomain is unloaded, and therefore the form, and the BackgroundWorker component on it, get killed. The form's OnDisposed and OnClosing methods never even get called; likewise the completion callback. I don't think you can do what you're trying to do here, though I'm not sure exactly what you're trying to do. You're basically hoping that the background task will complete before the appropriate test is called. Unless you synchronize the thread on which the tests are running and the background thread onto which the task is put, that's not gonna happen. When I built delays in, the AppDomain still got unloaded by the test runner (I'm using ReSharper, but it doesn't matter). ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Nunit-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/nunit-users