You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/06/14 03:18:46 UTC

[GitHub] [flink] zhuzhurk commented on a diff in pull request #19946: [FLINK-28018][core] correct the start index for creating empty splits in BinaryInputFormat#createInputSplits

zhuzhurk commented on code in PR #19946:
URL: https://github.com/apache/flink/pull/19946#discussion_r896335558


##########
flink-core/src/test/java/org/apache/flink/api/common/io/BinaryInputFormatTest.java:
##########
@@ -160,6 +160,44 @@ public void testGetStatisticsMultiplePaths() throws IOException {
                 stats.getTotalInputSize());
     }
 
+    @Test
+    public void testCreateInputSplitsWithEmptySplit() throws IOException {
+        // create temporary file with 3 blocks
+        final File tempFile = File.createTempFile("binary_input_format_test", "tmp");
+        tempFile.deleteOnExit();

Review Comment:
   The `tempFile` can be deleted only if the whole JVM exits. I would suggest to use `TemporaryFolder` which can be cleaned after the test method finishes. `FlinkUserCodeClassLoadersTest` can be an example to reference.



-- 
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-unsubscribe@flink.apache.org

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