From 90060d52f6a99ae2357ec617bf4038f2a4f95519 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Sat, 2 Jun 2018 20:19:59 -0700 Subject: [PATCH] HDFS-13648. Fix TestGetConf#testGetJournalNodes on Windows due to a mismatch line separator. Contributed by Giovanni Matteo Fumarola. (cherry picked from commit 8f83b9abf9a7462c50a1db18d4d99e80c535b09c) --- .../test/java/org/apache/hadoop/hdfs/tools/TestGetConf.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestGetConf.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestGetConf.java index 15c20b4cb64..13fee1f3938 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestGetConf.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestGetConf.java @@ -388,7 +388,7 @@ public class TestGetConf { } buffer.append(val); } - buffer.append("\n"); + buffer.append(System.lineSeparator()); expected1 = buffer.toString(); Set actual = DFSUtil.getJournalNodeAddresses(conf); @@ -462,7 +462,7 @@ public class TestGetConf { actual = DFSUtil.getJournalNodeAddresses(conf); assertEquals(expected.toString(), actual.toString()); - actual1 = "\n"; + actual1 = System.lineSeparator(); expected1 = getAddressListFromTool(TestType.JOURNALNODE, conf, true); assertEquals(expected1, actual1); @@ -479,7 +479,7 @@ public class TestGetConf { expected1 = getAddressListFromTool(TestType.JOURNALNODE, conf, true); - actual1 = "\n"; + actual1 = System.lineSeparator(); assertEquals(expected1, actual1); conf.clear(); }