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


##########
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:
   @adoroszlai , the test tries to create a few different snapshot files and 
test if they can be transferred correctly.  So these files should be closed 
locally. 



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