fix(engine/job): fix test case to correctly clean up resources

related to CAM-2115