This is an automated email from the ASF dual-hosted git repository.

aengineer pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/hadoop.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 4fdf016  HDDS-2245. Use dynamic ports for SCM in 
TestSecureOzoneCluster Contributed by kevin su.
4fdf016 is described below

commit 4fdf01635835a1b8f1107a50c112a3601a6a61f9
Author: Anu Engineer <aengin...@apache.org>
AuthorDate: Mon Oct 7 15:41:42 2019 -0700

    HDDS-2245. Use dynamic ports for SCM in TestSecureOzoneCluster
    Contributed by kevin su.
---
 .../org/apache/hadoop/ozone/TestSecureOzoneCluster.java     | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
index 68035f8..ca1f179 100644
--- 
a/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
+++ 
b/hadoop-ozone/integration-test/src/test/java/org/apache/hadoop/ozone/TestSecureOzoneCluster.java
@@ -53,6 +53,7 @@ import org.apache.hadoop.ipc.Server;
 import org.apache.hadoop.metrics2.lib.DefaultMetricsSystem;
 import org.apache.hadoop.minikdc.MiniKdc;
 import org.apache.hadoop.net.NetUtils;
+import org.apache.hadoop.net.ServerSocketUtil;
 import org.apache.hadoop.ozone.client.CertificateClientTestImpl;
 import org.apache.hadoop.ozone.common.Storage;
 import org.apache.hadoop.ozone.om.OMConfigKeys;
@@ -153,6 +154,18 @@ public final class TestSecureOzoneCluster {
     try {
       conf = new OzoneConfiguration();
       conf.set(ScmConfigKeys.OZONE_SCM_CLIENT_ADDRESS_KEY, "localhost");
+
+      conf.setInt(ScmConfigKeys.OZONE_SCM_CLIENT_PORT_KEY, ServerSocketUtil
+              .getPort(ScmConfigKeys.OZONE_SCM_CLIENT_PORT_DEFAULT, 100));
+      conf.setInt(ScmConfigKeys.OZONE_SCM_DATANODE_PORT_KEY, ServerSocketUtil
+              .getPort(ScmConfigKeys.OZONE_SCM_DATANODE_PORT_DEFAULT, 100));
+      conf.setInt(ScmConfigKeys.OZONE_SCM_BLOCK_CLIENT_PORT_KEY,
+              ServerSocketUtil.getPort(ScmConfigKeys
+                      .OZONE_SCM_BLOCK_CLIENT_PORT_DEFAULT, 100));
+      conf.setInt(ScmConfigKeys.OZONE_SCM_SECURITY_SERVICE_PORT_KEY,
+              ServerSocketUtil.getPort(ScmConfigKeys
+                      .OZONE_SCM_SECURITY_SERVICE_PORT_DEFAULT, 100));
+
       DefaultMetricsSystem.setMiniClusterMode(true);
       final String path = folder.newFolder().toString();
       metaDirPath = Paths.get(path, "om-meta");


---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-commits-h...@hadoop.apache.org

Reply via email to