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_r385801347
##########
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:
a bit strange that only first match gets copied, if it is a prefix, as a
user, I would naturally expect all matches to be copied
----------------------------------------------------------------
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