Added shutdown tests for cycle and task.cycle