zhuzhurk commented on a change in pull request #9950: [FLINK-14464][runtime] 
Introduce the AbstractUserClassPathJobGraphRetriever
URL: https://github.com/apache/flink/pull/9950#discussion_r339283903
 
 

 ##########
 File path: flink-core/src/test/java/org/apache/flink/util/FileUtilsTest.java
 ##########
 @@ -259,6 +267,67 @@ public void testCompression() throws IOException {
                assertDirEquals(compressDir.resolve(originalDir), 
extractDir.resolve(originalDir));
        }
 
+       @Test
+       public void testListFilesInPathWithoutAnyFileReturnEmptyList() throws 
IOException {
+               final java.nio.file.Path testDir = 
tmp.newFolder("_test_0").toPath();
+
+               assertTrue(Collections.<File>emptyList() ==
+                       FileUtils.listFilesInPath(testDir.toFile(), f -> 
f.getName().endsWith(".jar")));
+       }
+
+       @Test
+       public void testListFilesInPath() throws IOException {
+               final java.nio.file.Path testDir = 
tmp.newFolder("_test_1").toPath();
+               final Tuple3<Collection<File>, Collection<File>, 
Collection<URL>> result = prepareTestFiles(testDir);
 
 Review comment:
   I think it's better to let `prepareTestFiles` only return `Collection<File>`.
   Each test case can convert it to its expected result with `toRelativeFiles` 
or `toRelativeURLs`.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to