zentol commented on a change in pull request #10106: [FLINK-11463][e2e] Design
the e2e java framework so that at least the Kafka streaming tests can run on it
URL: https://github.com/apache/flink/pull/10106#discussion_r343569878
##########
File path:
flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/FlinkDistribution.java
##########
@@ -85,24 +86,31 @@ public FlinkDistribution() {
Assert.fail("The distDir property was not set. You can
set it when running maven via -DdistDir=<path> .");
}
final String backupDirProperty =
System.getProperty("logBackupDir");
- logBackupDir = backupDirProperty == null
- ? Optional.empty()
- : Optional.of(Paths.get(backupDirProperty));
- final Path flinkDir = Paths.get(distDirProperty);
+ logBackupDir = backupDirProperty == null ? null :
Paths.get(backupDirProperty);
+ originalFlinkDir = Paths.get(distDirProperty);
+ }
+
+ @Override
+ public void before() throws IOException {
+ temporaryFolder.create();
+
+ final Path flinkDir = temporaryFolder.newFolder().toPath();
+
+ LOG.info("Copying distribution to {}.", flinkDir);
+ AutoClosableProcess.create(
Review comment:
To make the code less platform dependent, could you try a version based on
`Files.walkFileTree()` and `Files.copy` with the `COPY_ATTRIBUTES` `CopyOption`?
----------------------------------------------------------------
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