You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by ch...@apache.org on 2022/11/11 15:35:30 UTC
[flink] branch master updated: [FLINK-28427][tests] MiniClusterResource respect explicit rest port configurations
This is an automated email from the ASF dual-hosted git repository.
chesnay pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/flink.git
The following commit(s) were added to refs/heads/master by this push:
new 74569dc1370 [FLINK-28427][tests] MiniClusterResource respect explicit rest port configurations
74569dc1370 is described below
commit 74569dc137038dfdb27b4216ee79cf36bbd789c9
Author: Chesnay Schepler <ch...@apache.org>
AuthorDate: Fri Nov 11 13:28:23 2022 +0100
[FLINK-28427][tests] MiniClusterResource respect explicit rest port configurations
---
.../java/org/apache/flink/runtime/testutils/MiniClusterResource.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/MiniClusterResource.java b/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/MiniClusterResource.java
index d7fc3bd9a26..ba609183f1c 100644
--- a/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/MiniClusterResource.java
+++ b/flink-runtime/src/test/java/org/apache/flink/runtime/testutils/MiniClusterResource.java
@@ -212,7 +212,10 @@ public class MiniClusterResource extends ExternalResource {
// set rest and rpc port to 0 to avoid clashes with concurrent MiniClusters
configuration.setInteger(JobManagerOptions.PORT, 0);
- configuration.setString(RestOptions.BIND_PORT, "0");
+ if (!(configuration.contains(RestOptions.BIND_PORT)
+ || configuration.contains(RestOptions.PORT))) {
+ configuration.setString(RestOptions.BIND_PORT, "0");
+ }
randomizeConfiguration(configuration);