HDFS-11700. TestHDFSServerPorts#testBackupNodePorts doesn't pass on Windows. Contributed by Anbang Hu.

This commit is contained in:
Inigo Goiri 2018-05-15 10:27:36 -07:00
parent 92ebd466c7
commit eaca7980ad
1 changed files with 5 additions and 0 deletions

View File

@ -381,6 +381,11 @@ public class TestHDFSServerPorts {
assertFalse("Backup started on same port as Namenode",
canStartBackupNode(backup_config)); // should fail
// reset namenode backup address because Windows does not release
// port used previously properly.
backup_config.set(
DFSConfigKeys.DFS_NAMENODE_BACKUP_ADDRESS_KEY, THIS_HOST);
// bind http server to a different port
backup_config.set(
DFSConfigKeys.DFS_NAMENODE_BACKUP_HTTP_ADDRESS_KEY, THIS_HOST);