HDFS-13591. TestDFSShell#testSetrepLow fails on Windows. Contributed by Anbang Hu.

(cherry picked from commit 9dbf4f01665d5480a70395a24519cbab5d4db0c5)
This commit is contained in:
Inigo Goiri 2018-05-28 16:34:02 -07:00
parent 961c0461fe
commit 86736cb279

View File

@ -2675,11 +2675,11 @@ public void testSetrepLow() throws Exception {
System.setErr(origErr);
}
assertEquals("Error message is not the expected error message",
"setrep: Requested replication factor of 1 is less than "
+ "the required minimum of 2 for /tmp/TestDFSShell-"
+ "testSetrepLow/testFileForSetrepLow\n",
bao.toString());
assertTrue("Error message is not the expected error message"
+ bao.toString(), bao.toString().startsWith(
"setrep: Requested replication factor of 1 is less than "
+ "the required minimum of 2 for /tmp/TestDFSShell-"
+ "testSetrepLow/testFileForSetrepLow"));
} finally {
shell.close();
cluster.shutdown();