xintongsong commented on a change in pull request #9022: [FLINK-13127] Fix
--yarnship classpath
URL: https://github.com/apache/flink/pull/9022#discussion_r307754514
##########
File path:
flink-yarn/src/test/java/org/apache/flink/yarn/YarnFileStageTest.java
##########
@@ -177,14 +179,23 @@ static void testCopyFromLocalRecursive(
try {
List<Path> remotePaths = new ArrayList<>();
HashMap<String, LocalResource> localResources = new
HashMap<>();
- AbstractYarnClusterDescriptor.uploadAndRegisterFiles(
+ final List<String> classpath =
AbstractYarnClusterDescriptor.uploadAndRegisterFiles(
Collections.singletonList(new
File(srcPath.toUri().getPath())),
targetFileSystem,
targetDir,
ApplicationId.newInstance(0, 0),
remotePaths,
localResources,
new StringBuilder());
+
+ assertEquals(
+ Arrays.asList(
+ srcDir.getName(),
+ srcDir.getName() + "/nested",
+ srcDir.getName() + "/nested/4",
+ srcDir.getName() + "/test.jar")
+ , classpath);
Review comment:
This check relies on the sorting of classpath. I'm ok with either sorting
the classpath or not. But I think we'd better not assume that in the test case.
Since there is no strong reason to guarantee the sorting, we may not need to
fail this test case if we disable or change the sorting of classpath in the
future.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services