RocMarshal commented on code in PR #20715:
URL: https://github.com/apache/flink/pull/20715#discussion_r962102803


##########
flink-java/src/test/java/org/apache/flink/api/java/io/TextInputFormatTest.java:
##########
@@ -144,23 +130,24 @@ public void testNestedFileRead() throws IOException {
      * removed.
      */
     @Test
-    public void testRemovingTrailingCR() throws IOException {
+    void testRemovingTrailingCR(@TempDir File tmpFile) throws IOException {
 
-        testRemovingTrailingCR("\n", "\n");
-        testRemovingTrailingCR("\r\n", "\n");
+        testRemovingTrailingCR(tmpFile, "\n", "\n");
+        testRemovingTrailingCR(tmpFile, "\r\n", "\n");
 
-        testRemovingTrailingCR("|", "|");
-        testRemovingTrailingCR("|", "\n");
+        testRemovingTrailingCR(tmpFile, "|", "|");
+        testRemovingTrailingCR(tmpFile, "|", "\n");
     }
 
-    private void testRemovingTrailingCR(String lineBreaker, String delimiter) 
throws IOException {
+    private void testRemovingTrailingCR(File tmpFile, String lineBreaker, 
String delimiter)
+            throws IOException {
         String first = "First line";
         String second = "Second line";
         String content = first + lineBreaker + second + lineBreaker;
 
         // create input file
         File tempFile =
-                File.createTempFile("TextInputFormatTest", "tmp", 
temporaryFolder.getRoot());
+                File.createTempFile("TextInputFormatTest", 
UUID.randomUUID().toString(), tmpFile);

Review Comment:
   Updated. 



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