Copilot commented on code in PR #19014:
URL: https://github.com/apache/pinot/pull/19014#discussion_r3611340444


##########
pinot-server/src/test/java/org/apache/pinot/server/predownload/PredownloadPredownloadStatusRecorderTest.java:
##########
@@ -76,8 +75,7 @@ public void testPredownloadComplete()
       tryRetriableFailure(testFolder);
       tryNonRetriableFailure(testFolder);
     } finally {
-      // Restore the original SecurityManager
-      System.setSecurityManager(originalSecurityManager);
+      ExitHelper.resetExitAction();
     }

Review Comment:
   `PredownloadStatusRecorder.setStatusRecordFolder(...)` mutates a static 
global used by production code, but the test never restores it. That leaves 
`_statusRecordFolder` pointing at a temporary directory that is later deleted 
in `tearDown()`, which can break any other test in the same JVM that calls 
`PredownloadStatusRecorder.predownloadComplete(...)` without resetting the 
folder first. Consider resetting the folder back to the production default in 
the `finally` block along with `ExitHelper.resetExitAction()`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to