HDDS-796. Fix failed test TestStorageContainerManagerHttpServer#testHttpPolicy.
This commit is contained in:
parent
d43cc5db0f
commit
15df2e7a75
@ -115,13 +115,10 @@ protected InetSocketAddress getBindAddress(String bindHostKey,
|
|||||||
final Optional<Integer> addressPort =
|
final Optional<Integer> addressPort =
|
||||||
getPortNumberFromConfigKeys(conf, addressKey);
|
getPortNumberFromConfigKeys(conf, addressKey);
|
||||||
|
|
||||||
final Optional<String> addresHost =
|
final Optional<String> addressHost =
|
||||||
getHostNameFromConfigKeys(conf, addressKey);
|
getHostNameFromConfigKeys(conf, addressKey);
|
||||||
|
|
||||||
String hostName = bindHost.orElse(addresHost.get());
|
String hostName = bindHost.orElse(addressHost.orElse(bindHostDefault));
|
||||||
if (hostName == null || hostName.isEmpty()) {
|
|
||||||
hostName = bindHostDefault;
|
|
||||||
}
|
|
||||||
|
|
||||||
return NetUtils.createSocketAddr(
|
return NetUtils.createSocketAddr(
|
||||||
hostName + ":" + addressPort.orElse(bindPortdefault));
|
hostName + ":" + addressPort.orElse(bindPortdefault));
|
||||||
|
Loading…
Reference in New Issue
Block a user