lhotari opened a new pull request #10032:
URL: https://github.com/apache/pulsar/pull/10032


   ### Motivation
   
   - Existing solution used in Pulsar Functions tests doesn't support 
testForkCount > 1 since there is code like this in many tests:
   ```
           // delete all function temp files
           File dir = new File(System.getProperty("java.io.tmpdir"));
           File[] foundFiles = dir.listFiles((ignoredDir, name) -> 
name.startsWith("function"));
   
           for (File file : foundFiles) {
               file.delete();
           }
   ```
   
   - After running Pulsar tests, there are extracted nar directories left in 
/tmp directory. This is a sign that proper cleanup isn't happening.
   
   
   ### Modifications
   
   - Use unique temporary nar extraction directory for each test
     - Delete directory consistently in AfterMethod
   
   - Add feature LocalRunner to create a unique temp directory for extracting 
nar files. Delete directory on close
   
   - Fix some ClassLoader resource cleanup issues that came up while working on 
the changes


-- 
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.

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


Reply via email to