changed engine life-cycle for code gen tests