From 5310542fb43044c2d8946ad5ab088e7b20390309 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Wed, 16 May 2018 09:31:46 -0700 Subject: [PATCH] HDFS-13557. TestDFSAdmin#testListOpenFiles fails on Windows. Contributed by Anbang Hu. (cherry picked from commit 6b67161ca33881d5f3d7606a57786e9c960759a1) --- .../java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java index 3ac627f6561..aab3aeef57d 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java @@ -813,12 +813,14 @@ public class TestDFSAdmin { if (closedFileSet != null) { for (Path closedFilePath : closedFileSet) { assertThat(outStr, - not(containsString(closedFilePath.toString() + "\n"))); + not(containsString(closedFilePath.toString() + + System.lineSeparator()))); } } for (Path openFilePath : openFilesMap.keySet()) { - assertThat(outStr, is(containsString(openFilePath.toString() + "\n"))); + assertThat(outStr, is(containsString(openFilePath.toString() + + System.lineSeparator()))); } }