LadyForest commented on code in PR #24390:
URL: https://github.com/apache/flink/pull/24390#discussion_r1520757091


##########
flink-connectors/flink-connector-files/src/test/java/org/apache/flink/connector/file/table/FileSystemOutputFormatTest.java:
##########
@@ -70,6 +85,11 @@ private static Map<File, String> 
getFileContentByPath(java.nio.file.Path directo
         return contents;
     }
 
+    private static Map<File, String> getStagingFileContent(

Review Comment:
   > What we want to make sure is that the class actually creates its own 
staging folder
   
   I believe this is the point we want to verify after moving the generation of 
the staging folder to `FileSystemOutputFormat`.
   
   I understand your concern. In fact, `PartitionWriterTest` and 
`FileSystemCommitterTest` have already covered the checks for written content. 
Therefore, the tests for `FileSystemOutputFormat` should indeed focus more on 
the creation/deletion of directories. If we were to check file content as well, 
it would resemble an IT case.
   
   I guess the reason content is checked is that the test author believes 
`FileSystemOutputFormat` has the capability to write records (implemented 
through the `writeRecord` method) and commit files from the staging folder to 
the outputPath (achieved with `finalizeGlobal`). Thus, it tested the written 
content even before our modifications were made.



-- 
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: issues-unsubscr...@flink.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to