瀏覽代碼

HDFS-12280. Ozone: TestOzoneContainer#testCreateOzoneContainer fails. Contributed by Lokesh Jain.

Anu Engineer 7 年之前
父節點
當前提交
532ced18fc

+ 1 - 1
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/ozone/container/ozoneimpl/TestOzoneContainer.java

@@ -59,7 +59,6 @@ public class TestOzoneContainer {
     MiniOzoneCluster cluster = null;
     try {
       cluster = new MiniOzoneCluster.Builder(conf)
-          .setRandomContainerPort(false)
           .setHandlerType(OzoneConsts.OZONE_HANDLER_DISTRIBUTED).build();
       // We don't start Ozone Container via data node, we will do it
       // independently in our test path.
@@ -67,6 +66,7 @@ public class TestOzoneContainer {
           containerName);
       conf.setInt(OzoneConfigKeys.DFS_CONTAINER_IPC_PORT,
           pipeline.getLeader().getContainerPort());
+      conf.setBoolean(OzoneConfigKeys.DFS_CONTAINER_IPC_RANDOM_PORT, false);
       container = new OzoneContainer(DFSTestUtil.getLocalDatanodeID(1),
           conf);
       container.start();