Skip to content

Commit d710ec8

Browse files
authored
HDFS-16140. TestBootstrapAliasmap fails by BindException. (#3229)
Reviewed-by: Hui Fei <ferhui@apache.org>
1 parent 5d76549 commit d710ec8

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/ha/TestBootstrapAliasmap.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public class TestBootstrapAliasmap {
5151
public void setup() throws Exception {
5252
Configuration conf = new Configuration();
5353
MiniDFSCluster.setupNamenodeProvidedConfiguration(conf);
54+
// use free port instead of default 50200 port
55+
conf.set(DFSConfigKeys.DFS_PROVIDED_ALIASMAP_INMEMORY_RPC_ADDRESS,
56+
"127.0.0.1:" + NetUtils.getFreeSocketPort());
5457
cluster = new MiniDFSCluster.Builder(conf)
5558
.numDataNodes(1)
5659
.build();

0 commit comments

Comments
 (0)