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

 ##########
 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:
   The method name implies that only 1 jar will be moved.
   
   Only went with prefix since spelling out the entire jar name is error-prone.
   
   We may actually want to fail here if the prefix matches more than one jar, 
as it was likely a mistake. In any case, not related to this PR as the current 
behavior isn't new.

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