From fc2a13c347f5256cf513fdfd12ee969cb9d29e2b Mon Sep 17 00:00:00 2001 From: Chris Nauroth Date: Wed, 30 Oct 2013 21:13:05 +0000 Subject: [PATCH] YARN-1358. TestYarnCLI fails on Windows due to line endings. Contributed by Chuan Liu. git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1537305 13f79535-47bb-0310-9956-ffa450edef68 --- hadoop-yarn-project/CHANGES.txt | 3 +++ .../org/apache/hadoop/yarn/client/cli/TestYarnCLI.java | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/hadoop-yarn-project/CHANGES.txt b/hadoop-yarn-project/CHANGES.txt index 487681a6e6..7b74a31ccf 100644 --- a/hadoop-yarn-project/CHANGES.txt +++ b/hadoop-yarn-project/CHANGES.txt @@ -165,6 +165,9 @@ Release 2.2.1 - UNRELEASED YARN-1357. TestContainerLaunch.testContainerEnvVariables fails on Windows. (Chuan Liu via cnauroth) + YARN-1358. TestYarnCLI fails on Windows due to line endings. (Chuan Liu via + cnauroth) + Release 2.2.0 - 2013-10-13 INCOMPATIBLE CHANGES diff --git a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java index 778fd36dc4..1d08f245d0 100644 --- a/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java +++ b/hadoop-yarn-project/hadoop-yarn/hadoop-yarn-client/src/test/java/org/apache/hadoop/yarn/client/cli/TestYarnCLI.java @@ -875,8 +875,8 @@ public void testMissingArguments() throws Exception { ApplicationCLI cli = createAndGetAppCLI(); int result = cli.run(new String[] { "-status" }); Assert.assertEquals(result, -1); - Assert.assertEquals("Missing argument for options\n" - + createApplicationCLIHelpMessage(), sysOutStream.toString()); + Assert.assertEquals(String.format("Missing argument for options%n%1s", + createApplicationCLIHelpMessage()), sysOutStream.toString()); sysOutStream.reset(); NodeCLI nodeCLI = new NodeCLI(); @@ -885,8 +885,8 @@ public void testMissingArguments() throws Exception { nodeCLI.setSysErrPrintStream(sysErr); result = nodeCLI.run(new String[] { "-status" }); Assert.assertEquals(result, -1); - Assert.assertEquals("Missing argument for options\n" - + createNodeCLIHelpMessage(), sysOutStream.toString()); + Assert.assertEquals(String.format("Missing argument for options%n%1s", + createNodeCLIHelpMessage()), sysOutStream.toString()); } private void verifyUsageInfo(YarnCLI cli) throws Exception {