← Back to team overview

nunit-core team mailing list archive

[Bug 904841] Re: After exiting for timeout the teardown method is not executed

 

This turned out to be a race condition between the main test thread and
the individual test case thread. In some cases the teardown was run, in
others not at all and in still others teardown could start and then be
interupted. Inserting a Join in the logic that cancels the thread causes
it to work reliably.

The down side of this fix is that any test thread that absolutely
refuses to terminate - e.g. by using an infinite loop in the
ThreadAbortException handler - will hang up NUnit itself. We'll wait to
see if this is a practical problem in the future.

** Changed in: nunitv2
   Importance: Undecided => Medium

** Changed in: nunitv2
     Assignee: (unassigned) => Charlie Poole (charlie.poole)

** Changed in: nunitv2
    Milestone: None => 2.6.0

** Changed in: nunitv2
       Status: Confirmed => Fix Committed

-- 
You received this bug notification because you are a member of NUnit
Developers, which is subscribed to NUnit V2.
https://bugs.launchpad.net/bugs/904841

Title:
  After exiting for timeout the teardown method is not executed

Status in NUnit V2 Test Framework:
  Fix Committed

Bug description:
  From the NUnit-discuss list: http://groups.google.com/group/nunit-
  discuss/browse_thread/thread/9db7ebfc1114b91a

  When a test times out, the teardown method is not executed. The person
  reporting it wants the TearDown to execute so that cleanup may be
  performed. This will need some investigation both for general
  desirability and feasibility.

To manage notifications about this bug go to:
https://bugs.launchpad.net/nunitv2/+bug/904841/+subscriptions


References