You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@iotdb.apache.org by GitBox <gi...@apache.org> on 2019/01/25 15:23:32 UTC

[GitHub] kr11 commented on a change in pull request #31: Fix sonar

kr11 commented on a change in pull request #31: Fix sonar
URL: https://github.com/apache/incubator-iotdb/pull/31#discussion_r251022573
 
 

 ##########
 File path: iotdb/src/test/java/org/apache/iotdb/db/postback/sender/FileManagerTest.java
 ##########
 @@ -229,46 +228,46 @@ public void testGetNowLocalFileList() throws IOException {
         if (!file.getParentFile().exists()) {
           file.getParentFile().mkdirs();
         }
-        if (!file.exists()) {
-          file.createNewFile();
+        if (!file.exists() && !file.createNewFile()) {
+          LOGGER.error("Can not create new file {}", file.getAbsoluteFile());
         }
       }
     }
-    manager.setNowLocalFiles(new HashMap<>());
-    manager.getNowLocalFileList(new String[]{SENDER_FILE_PATH_TEST});
-    fileList = manager.getNowLocalFiles();
+    manager.setCurrentLocalFiles(new HashMap<>());
+    manager.getCurrentLocalFileList(new String[]{SENDER_FILE_PATH_TEST});
+    fileList = manager.getCurrentLocalFiles();
     assert (allFileList.size() == fileList.size());
     for (Entry<String, Set<String>> entry : fileList.entrySet()) {
       assert (allFileList.containsKey(entry.getKey()));
-      System.out.println("allFileList");
+      LOGGER.info("allFileList");
 
 Review comment:
   good advice

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services