Please open a bug for us.

Looks like we need to be more careful when we abort or cancel tests to
ensure we still allow tear down and dispose methods to run.  This is
actually a little trickier than it sounds because you have to wonder what
will happen if the tear down or dispose hangs.  If we allow too much time,
then the user experience is negatively impacted and it ends up looking like
a hang.  If we allow too little time, then these final actions may not get a
chance to run completely.

As a workaround for now, you might just wrap your test with a "using"
statement around the creation of the COM port instead of doing that work in
[SetUp] / [TearDown].  Annoying, yes, but a little more robust.

Jeff. 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Jordan
Sent: Wednesday, June 25, 2008 1:15 PM
To: MbUnit.User
Subject: MbUnit Testfixture Teardown MbUnit Alpha 3


I have a test that opens a COM port.  If I abort the test in Gallio by
clicking stop or the test times out or maybe some other errors it does not
appear to run the teardown method.  In these cases I still need to close the
COM port.  Otherwise I can't start the test again until I close Gallio to
terminate its process which opened the COM port.  I tried implementing a
Dispose method but that appears to only be called after the teardown method.
Any suggestions?

Thanks,
Jordan



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"MbUnit.User" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/MbUnitUser?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to