-
Notifications
You must be signed in to change notification settings - Fork 765
Closed
Description
Pursuant to a discussion on issue #326 I added some tests in order to see the behavior of tests that caused a timeout because of a hung SetUp or a hung TearDown. An infinite loop in the SetUp is handled the same as one in the test but a loop in TearDown causes the entire run to hang.
The cause of this phenomenon is that we run TearDown out of a finally clause. Code in a finally clause is not interupted by a ThreadAbortException.
The same behavior occurs in NUnit V2. See nunit/nunitv2#26
It appears that there are three options:
- Don't run TearDown in a finally clause.
- Don't use Thread.Abort to cancel a test that times out.
- Have NUnit host the CLR and thereby gain the ability to escalate aborts.
All of these are fairly big deals, so some design work is needed.
Reactions are currently unavailable