aajisaka commented on a change in pull request #3661:
URL: https://github.com/apache/hadoop/pull/3661#discussion_r758065524
##########
File path:
hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/blockmanagement/TestBlockManagerSafeMode.java
##########
@@ -242,6 +242,20 @@ public void testCheckSafeMode9() throws Exception {
assertTrue(content.contains("Using 3000 as SafeModeMonitor Interval"));
}
+ @Test(timeout = 20000)
+ public void testCheckSafeMode10(){
+ Configuration conf = new HdfsConfiguration();
+ conf.setLong(DFSConfigKeys.DFS_NAMENODE_SAFEMODE_RECHECK_INTERVAL_KEY, -1);
+ GenericTestUtils.LogCapturer logs =
+ GenericTestUtils.LogCapturer.captureLogs(BlockManagerSafeMode.LOG);
+ BlockManagerSafeMode blockManagerSafeMode = new BlockManagerSafeMode(bm,
+ fsn, true, conf);
+ String content = logs.getOutput();
+ assertTrue(content.contains("Invalid value for " +
+ DFSConfigKeys.DFS_NAMENODE_SAFEMODE_RECHECK_INTERVAL_KEY +
+ ".Should be greater than 0, but is -1"));
Review comment:
Would you use assertJ API? It will output much helpful error message
when the assertion fails.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]