adoroszlai commented on code in PR #947:
URL: https://github.com/apache/ratis/pull/947#discussion_r1369714170


##########
ratis-server/src/test/java/org/apache/ratis/InstallSnapshotFromLeaderTests.java:
##########
@@ -168,12 +169,12 @@ public long takeSnapshot() {
           FileUtils.createDirectories(snapshotRoot);
           FileUtils.createDirectories(file1.getParentFile());
           FileUtils.createDirectories(file2.getParentFile());
-          FileUtils.createNewFile(file1.toPath());
-          FileUtils.createNewFile(file2.toPath());
+          FileUtils.newOutputStream(file1.toPath(), 
StandardOpenOption.CREATE_NEW);
+          FileUtils.newOutputStream(file2.toPath(), 
StandardOpenOption.CREATE_NEW);

Review Comment:
   My point is that the test is leaking these two output streams.  It's not a 
big deal, since it's just a unit test.
   
   > these files should be closed locally
   
   Can you please clarify that?



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