HDFS-7111. TestSafeMode assumes Unix line endings in safe mode tip. Contributed by Chris Nauroth.
This commit is contained in:
parent
e0b1dc514f
commit
dc2ebf88a8
|
@ -950,6 +950,9 @@ Release 2.6.0 - UNRELEASED
|
||||||
|
|
||||||
HDFS-6534. Fix build on macosx: HDFS parts (Binglin Chang via aw)
|
HDFS-6534. Fix build on macosx: HDFS parts (Binglin Chang via aw)
|
||||||
|
|
||||||
|
HDFS-7111. TestSafeMode assumes Unix line endings in safe mode tip.
|
||||||
|
(cnauroth)
|
||||||
|
|
||||||
Release 2.5.1 - 2014-09-05
|
Release 2.5.1 - 2014-09-05
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -66,6 +66,7 @@ public class TestSafeMode {
|
||||||
public static final Log LOG = LogFactory.getLog(TestSafeMode.class);
|
public static final Log LOG = LogFactory.getLog(TestSafeMode.class);
|
||||||
private static final Path TEST_PATH = new Path("/test");
|
private static final Path TEST_PATH = new Path("/test");
|
||||||
private static final int BLOCK_SIZE = 1024;
|
private static final int BLOCK_SIZE = 1024;
|
||||||
|
private static final String NEWLINE = System.getProperty("line.separator");
|
||||||
Configuration conf;
|
Configuration conf;
|
||||||
MiniDFSCluster cluster;
|
MiniDFSCluster cluster;
|
||||||
FileSystem fs;
|
FileSystem fs;
|
||||||
|
@ -196,7 +197,7 @@ public class TestSafeMode {
|
||||||
|
|
||||||
String status = nn.getNamesystem().getSafemode();
|
String status = nn.getNamesystem().getSafemode();
|
||||||
assertEquals("Safe mode is ON. The reported blocks 0 needs additional " +
|
assertEquals("Safe mode is ON. The reported blocks 0 needs additional " +
|
||||||
"15 blocks to reach the threshold 0.9990 of total blocks 15.\n" +
|
"15 blocks to reach the threshold 0.9990 of total blocks 15." + NEWLINE +
|
||||||
"The number of live datanodes 0 has reached the minimum number 0. " +
|
"The number of live datanodes 0 has reached the minimum number 0. " +
|
||||||
"Safe mode will be turned off automatically once the thresholds " +
|
"Safe mode will be turned off automatically once the thresholds " +
|
||||||
"have been reached.", status);
|
"have been reached.", status);
|
||||||
|
@ -448,9 +449,9 @@ public class TestSafeMode {
|
||||||
|
|
||||||
String tipMsg = cluster.getNamesystem().getSafemode();
|
String tipMsg = cluster.getNamesystem().getSafemode();
|
||||||
assertTrue("Safemode tip message doesn't look right: " + tipMsg,
|
assertTrue("Safemode tip message doesn't look right: " + tipMsg,
|
||||||
tipMsg.contains("The number of live datanodes 0 needs an additional " +
|
tipMsg.contains("The number of live datanodes 0 needs an additional " +
|
||||||
"1 live datanodes to reach the minimum number 1.\n" +
|
"1 live datanodes to reach the minimum number 1." +
|
||||||
"Safe mode will be turned off automatically"));
|
NEWLINE + "Safe mode will be turned off automatically"));
|
||||||
|
|
||||||
// Start a datanode
|
// Start a datanode
|
||||||
cluster.startDataNodes(conf, 1, true, null, null);
|
cluster.startDataNodes(conf, 1, true, null, null);
|
||||||
|
|
Loading…
Reference in New Issue