From 9dbf4f01665d5480a70395a24519cbab5d4db0c5 Mon Sep 17 00:00:00 2001 From: Inigo Goiri Date: Mon, 28 May 2018 16:34:02 -0700 Subject: [PATCH] HDFS-13591. TestDFSShell#testSetrepLow fails on Windows. Contributed by Anbang Hu. --- .../test/java/org/apache/hadoop/hdfs/TestDFSShell.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java index e82863a34a..c352dc99a2 100644 --- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java +++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDFSShell.java @@ -2829,11 +2829,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();