hfutatzhanghb commented on code in PR #5876:
URL: https://github.com/apache/hadoop/pull/5876#discussion_r1272217666
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/test/java/org/apache/hadoop/hdfs/server/federation/router/TestRouterSafemode.java:
##########
@@ -141,6 +141,31 @@ public void testRouterExitSafemode()
verifyRouter(RouterServiceState.RUNNING);
}
+ @Test
+ public void testRouterExitSafemodeResetUpTime()
+ throws InterruptedException, IllegalStateException, IOException {
+
+ Calendar calendar = Calendar.getInstance();
+ // Get the future times, add one day to the current date.
+ calendar.add(Calendar.DAY_OF_MONTH, 1);
+ long timestampAfterOneDay = calendar.getTimeInMillis();
+ router.getSafemodeService().setStartupTime(timestampAfterOneDay);
+
+ assertTrue(router.getSafemodeService().isInSafeMode());
+ verifyRouter(RouterServiceState.SAFEMODE);
+
+ // Wait for initial time in milliseconds
Review Comment:
One tiny issue, please unify the comments pattern. Add dot in the end of a
sentence.
--
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]