-
Notifications
You must be signed in to change notification settings - Fork 20
Description
I believe that Test::Class's current behavior with regard to the
interaction between failed startup methods and shutdown methods is
undesirable. I believe that shutdown methods should always run, even
if there's a failure in a startup method.
I frequently have tests where I set up several things in a startup
method, beginning with creating a test account (which is a number of
related rows in a database). My shutdown methods for such test
classes then always include deleting all the rows related to that
account from the database. If the first thing I do in a startup
method is create that account, but the second thing in the method
tries to do something with it which fails unexpectedly (perhaps
throwing an exception in the startup method), I still want my
shutdown method to run and remove the DB rows.
I have attached a patch against 0.36 to implement this behavior
(which I feel is more correct).