Re: Multiple threading [Test] question
"Charlie Poole" <[email protected]> Fri, 12 Sep 2008 17:20:57 -0700
| Newsgroups | gmane.comp.windows.dotnet.nunit.user |
|---|---|
| Message-ID | <017901c91536$990bbb70$6401a8c0@ferrari> |
I think we can do it, but it's a big change - not something I feel I can just refactor towards. I'll post some design ideas on the nunitv3 list over the next month or so - but first, to get the next alpha out. :-) Charlie > -----Original Message----- > From: Kelly Anderson [mailto:[email protected]] > Sent: Friday, September 12, 2008 5:11 PM > To: Charlie Poole > Cc: [email protected] > Subject: Re: [Nunit-users] Multiple threading [Test] question > > On Fri, Sep 12, 2008 at 12:45 PM, Charlie Poole > <[email protected]> wrote: > > Hi Kelly, > > > >> If you run a [Test] and it spawns off another thread, and > that thread > >> throws an exception, does the root Test catch that exception? > > > > No. This is the fundametal problem of testing apps that > spawn threads. > > > >> Is such behavior even possible? > > > > Using managed code, it's not possible to catch and correcty handle > > arbitrary exceptions thrown by threads that NUnit doesn't actually > > know about. > > > > For the more limited situation where the test creates the > thread, you > > can arrange to catch exceptions and pass them on to NUnit. > > It would be possible for the framework to provide a method for > > spawning threads that did this for you. But if the thread > is created > > in the app under test, there's no way in the current architecture. > > > > This is one of the primary reasons I've been talking about > really big > > architectural changes for 3.0. > > That's sort of where I thought this would go. Do you think > that there is a possibility of fixing this even with massive > architectural changes? > > -Kelly > ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/