Cleanup doesn't run when exception occurs in startup. #4799
Closed
Description
When an exception occurs in startup, the cleanup is never run.
Expected behaviour: Any cleanup steps added should be run, especially when using the cleanup-context.
e.g.
Task A = Setup DB as cleanup context.
Task B = Setup a remote connection as cleanup context. This throws an exception.
Actual behaviour:
Task A is successfully setup.
Task B creates an exception.
No cleanup happens.
Expected behaviour:
Task A is successfully setup.
Task B creates an exception.
Task A cleanup happens.