openinx 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_r344554821
##########
File path:
flink-end-to-end-tests/flink-end-to-end-tests-common/src/main/java/org/apache/flink/tests/util/FlinkDistribution.java
##########
@@ -123,20 +126,28 @@ public void afterTestSuccess() {
@Override
public void afterTestFailure() {
- logBackupDir.ifPresent(backupLocation -> {
+ if (logBackupDir != null) {
final UUID id = UUID.randomUUID();
- LOG.info("Backing up logs to {}/{}.", backupLocation,
id);
+ LOG.info("Backing up logs to {}/{}.", logBackupDir, id);
try {
- Files.createDirectories(backupLocation);
- FileUtils.copyDirectory(log.toFile(),
backupLocation.resolve(id.toString()).toFile());
+ Files.createDirectories(logBackupDir);
+ FileUtils.copyDirectory(log.toFile(),
logBackupDir.resolve(id.toString()).toFile());
} catch (IOException e) {
LOG.warn("An error occurred while backing up
logs.", e);
}
- });
-
+ }
afterTestSuccess();
}
+ /**
+ * Read the value of `rest.port` part in
FLINK_DIST_DIR/conf/flink-conf.yaml.
+ *
+ * @return the rest port which standalone Flink cluster will listen.
+ */
+ public int getRestPort() {
+ return defaultConfig.getInteger("rest.port", 8081);
Review comment:
Fine, let me revert to use 8081 firstly. Will file a separate issue to
improve the port management. Thanks much.
----------------------------------------------------------------
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