alexott commented on a change in pull request #3428: [ZEPPELIN-4305] 
LocalStorageConfig.atomicWriteToFile throws exception
URL: https://github.com/apache/zeppelin/pull/3428#discussion_r316524386
 
 

 ##########
 File path: 
zeppelin-zengine/src/test/java/org/apache/zeppelin/storage/LocalConfigStorageTest.java
 ##########
 @@ -0,0 +1,50 @@
+package org.apache.zeppelin.storage;
+
+import org.apache.commons.io.IOUtils;
+import org.junit.Test;
+
+import java.io.BufferedWriter;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+
+import static org.junit.Assert.*;
+
+public class LocalConfigStorageTest {
+    public static final String TEST_STRING = "this is a test!";
+
+    @Test
+    public void testWritingAtomically() throws IOException {
+        final Path destination = Files.createTempFile("test-", "file");
+        final File destinationFile = destination.toFile();
+        try {
+            LocalConfigStorage.atomicWriteToFile(TEST_STRING, destinationFile);
 
 Review comment:
   @jongyoul Sorry, you mean to move them into a separate class that has 
package local visibility?

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to