ppkarwasz opened a new pull request, #506:
URL: https://github.com/apache/logging-flume/pull/506

   `SslContextAwareAbstractSource` loaded the keystore through a 
`FileInputStream` that was never closed, both when validating the configuration 
in `configureSsl` and each time `getSslContext` created an `SSLContext`. The 
leaked handle keeps the keystore locked on Windows until the stream is garbage 
collected.
   
   This surfaced in apache/logging-flume-http#7: `TestHTTPSource` was migrated 
to JUnit 5, whose `@TempDir` cleanup reports files it cannot delete, and the 
Windows build failed on the still-open `keystore.jks`. JUnit 4's 
`TemporaryFolder` silently ignored the same failure here.
   
   ## Changes
   
   - Load the keystore in a try-with-resources block in both places.
   - Add `TestSslContextAwareAbstractSource`, which checks the SSL context 
creation, the password validation, that the keystore can be deleted after use 
(the Windows symptom) and, on Linux, that no descriptor in `/proc/self/fd` 
still points at the keystore. Against the unfixed code the last test fails with 
two open descriptors.
   - Add a changelog entry.
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to