Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Work around file handle leak when Undertow is stopped
There's a bug in Undertow that means it may leak a file handle is the server is stopped immediately after a response to an SSL request has been received. The stop processing races with Undertow's SSL support tidying things up after sending the response. When the stop processing wins, the tidying up fails with a NullPointerException that prevents an input stream from being closed. On Windows, the input stream remaining open prevents JUnit from being able to clean up its temporary directory. This commit uses Awaitility to wait for the file that's being served over SSL to be deleted before stopping the server. On Windows, this will delay the stop processing from beginning until after the tidy up that's performed after sending the response has been completed, hopefully eliminating the race condition that resulted in the input stream being left open. Fixes gh-21172
- Loading branch information