[
https://issues.apache.org/jira/browse/HDFS-16324?focusedWorklogId=687141&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-687141
]
ASF GitHub Bot logged work on HDFS-16324:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 29/Nov/21 06:22
Start Date: 29/Nov/21 06:22
Worklog Time Spent: 10m
Work Description: 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]
Issue Time Tracking
-------------------
Worklog Id: (was: 687141)
Time Spent: 2h 20m (was: 2h 10m)
> fix error log in BlockManagerSafeMode
> -------------------------------------
>
> Key: HDFS-16324
> URL: https://issues.apache.org/jira/browse/HDFS-16324
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: hdfs
> Affects Versions: 3.3.1
> Reporter: guophilipse
> Priority: Minor
> Labels: pull-request-available
> Time Spent: 2h 20m
> Remaining Estimate: 0h
>
> if `recheckInterval` was set as invalid value, there will be warning log
> output, but the message seems not that proper ,we can improve it.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]