From c168329cc425ab8ef49357535321208c060f6ac6 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Tue, 15 May 2018 10:27:36 -0700 Subject: [PATCH] HDFS-11700. TestHDFSServerPorts#testBackupNodePorts doesn't pass on Windows. Contributed by Anbang Hu. (cherry picked from commit eaca7980ad2a750f6b0025a706062740c2ddded2) --- .../java/org/apache/hadoop/hdfs/TestHDFSServerPorts.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSServerPorts.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSServerPorts.java index 59e85553e5c..12d92538a92 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSServerPorts.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestHDFSServerPorts.java @@ -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);