YARN-700. TestInfoBlock fails on Windows because of line ending missmatch. Contributed by Ivan Mitic.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1492383 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Chris Nauroth 2013-06-12 19:18:39 +00:00
parent 80eb92aff0
commit 1ed916f6c6
2 changed files with 9 additions and 6 deletions

View File

@ -497,6 +497,9 @@ Release 2.1.0-beta - UNRELEASED
YARN-767. Initialize application metrics at RM bootup. (Jian He via YARN-767. Initialize application metrics at RM bootup. (Jian He via
acmurthy) acmurthy)
YARN-700. TestInfoBlock fails on Windows because of line ending missmatch.
(Ivan Mitic via cnauroth)
BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS BREAKDOWN OF HADOOP-8562 SUBTASKS AND RELATED JIRAS
YARN-158. Yarn creating package-info.java must not depend on sh. YARN-158. Yarn creating package-info.java must not depend on sh.

View File

@ -70,12 +70,12 @@ public void testMultilineInfoBlock() throws Exception{
WebAppTests.testBlock(MultilineInfoBlock.class); WebAppTests.testBlock(MultilineInfoBlock.class);
TestInfoBlock.pw.flush(); TestInfoBlock.pw.flush();
String output = TestInfoBlock.sw.toString().replaceAll(" +", " "); String output = TestInfoBlock.sw.toString().replaceAll(" +", " ");
String expectedSinglelineData = "<tr class=\"odd\">\n" String expectedSinglelineData = String.format("<tr class=\"odd\">%n"
+ " <th>\n Single_line_value\n <td>\n This is one line.\n"; + " <th>%n Single_line_value%n <td>%n This is one line.%n");
String expectedMultilineData = "<tr class=\"even\">\n" String expectedMultilineData = String.format("<tr class=\"even\">%n"
+ " <th>\n Multiple_line_value\n <td>\n <div>\n" + " <th>%n Multiple_line_value%n <td>%n <div>%n"
+ " This is first line.\n </div>\n <div>\n" + " This is first line.%n </div>%n <div>%n"
+ " This is second line.\n </div>\n"; + " This is second line.%n </div>%n");
assertTrue(output.contains(expectedSinglelineData) && output.contains(expectedMultilineData)); assertTrue(output.contains(expectedSinglelineData) && output.contains(expectedMultilineData));
} }
} }