wuchong commented on code in PR #20469:
URL: https://github.com/apache/flink/pull/20469#discussion_r945701430


##########
flink-connectors/flink-connector-hive/src/test/java/org/apache/flink/connectors/hive/HiveDialectQueryITCase.java:
##########
@@ -469,7 +469,14 @@ public void testInsertDirectory() throws Exception {
                 .await();
         java.nio.file.Path[] files =
                 FileUtils.listFilesInDirectory(
-                                Paths.get(dataDir), (path) -> 
!path.toFile().isHidden())
+                                Paths.get(dataDir),
+                                (path) ->
+                                        !path.toFile().isHidden()
+                                                && !path.toFile()
+                                                        .getName()
+                                                        .equals(
+                                                                HiveOptions
+                                                                        
.SINK_PARTITION_COMMIT_SUCCESS_FILE_NAME))

Review Comment:
   Should be 
`HiveOptions.SINK_PARTITION_COMMIT_SUCCESS_FILE_NAME.defaultValue()` or 
`tableEnv.getConfig().get(HiveOptions.SINK_PARTITION_COMMIT_SUCCESS_FILE_NAME)`.



##########
flink-connectors/flink-connector-files/src/test/java/org/apache/flink/connector/file/table/FileSystemCommitterTest.java:
##########
@@ -161,7 +194,8 @@ void testEmptyPartition() throws Exception {
         File emptyPartitionFile = new File(outputPath.toFile(), 
"dt=2022-08-02");
         assertThat(emptyPartitionFile).exists();
         assertThat(emptyPartitionFile).isDirectory();
-        assertThat(emptyPartitionFile).isEmptyDirectory();
+        assertThat(emptyPartitionFile)
+                .isDirectoryNotContaining(file -> 
!file.getName().equals(SUCCESS_FILE_NAME));

Review Comment:
   We can assert the `emptyPartitionFile` is not an empty directory for testing 
there is only success file under the directory.



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