Wait until the task is done in test_task::finish_failed and test_task::finish to ensure that it is folded into its parent.