Xiao Chen created HDFS-9587:
-------------------------------
Summary: Modify tests that initialize MiniDFSNNTopology with
hard-coded ports to use ServerSocketUtil#getPorts
Key: HDFS-9587
URL: https://issues.apache.org/jira/browse/HDFS-9587
Project: Hadoop HDFS
Issue Type: Test
Reporter: Xiao Chen
Assignee: Xiao Chen
In tests with HA we have to {{setHttpPort}} to non-ephemeral ports when
creating {{MiniDFSNNTopology}}. But hard-coding it may result in failures if
the hard-coded port is in use in the env.
We should use {{ServerSocketUtil#getPorts}} to reduce the probability of such
failures. This jira is to propose to update all
{{MiniDFSNNTopology#setHttpPort}} usages. (Currently there's only
{{ServerSocketUtil#getPort}}, but HDFS-9444 is adding the ability to get
multiple free ports)
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)