-
Notifications
You must be signed in to change notification settings - Fork 270
Closed
Labels
Description
There is a need to cleanup around tasks. For example there has to be a way to start a server, run integration tests and stop the server if a failure occurs. Not being able to stop a server leaves processes hanging around, requires a cleanup and makes it very hard to debug failures.
Therefore:
- Add an attribute to
@after, calledteardown. The attribute isFalseby default.- If an exception occurs anywhere in
@beforeor in a task or in any of the@afteractions, the exception is recorded, then all@afteractions withteardown=Trueare executed - While executing
teardown@afteractions, the errors raised therein are suppressed. The executing actions log their errors without raising them. - Once all
teardown@afteractions are executed the originating error is raised.
- If an exception occurs anywhere in
- Use ordered dictionaries in
ExecutionManagerto make sure that the order the actions are registered in is the order that actions are executed in. This is important to ensure that behaviors are predictable as far as cleanup order.
Reactions are currently unavailable