azagrebin commented on a change in pull request #11240: [FLINK-16190][e2e] 
Migrate tests to FlinkResource
URL: https://github.com/apache/flink/pull/11240#discussion_r386900825
 
 

 ##########
 File path: 
flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/FlinkDistribution.java
 ##########
 @@ -261,19 +263,33 @@ public void submitSQLJob(SQLJobSubmission job) throws 
IOException {
                AutoClosableProcess.runBlocking(commands.toArray(new 
String[0]));
        }
 
-       public void copyOptJarsToLib(String jarNamePrefix) throws 
FileNotFoundException, IOException {
-               final Optional<Path> reporterJarOptional;
-               try (Stream<Path> logFiles = Files.walk(opt)) {
-                       reporterJarOptional = logFiles
-                               .filter(path -> 
path.getFileName().toString().startsWith(jarNamePrefix))
+       public void moveJar(JarMove move) throws IOException {
+               final Path source = mapJarLocationToPath(move.getSource());
+               final Path target = mapJarLocationToPath(move.getTarget());
+
+               final Optional<Path> jarOptional;
+               try (Stream<Path> files = Files.walk(source)) {
+                       jarOptional = files
+                               .filter(path -> 
path.getFileName().toString().startsWith(move.getJarNamePrefix()))
 
 Review comment:
   Why not to allow copying of multiple matching files?
   If so, I like the idea of failing then and jdocs can be extended to state 
this

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

Reply via email to