The TestDAP_ouput test is flaky due to the order of events during shutdown. We were stopping the output and error handle redirection after we finished the disconnect request, which can cause us to miss output events due to timing. Moving when we stop the redirection to ensure we have consistent output prior to disconnect responding. Fixes #128567