You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-issues@hadoop.apache.org by "hfutatzhanghb (via GitHub)" <gi...@apache.org> on 2023/07/24 12:49:20 UTC

[GitHub] [hadoop] hfutatzhanghb commented on a diff in pull request #5876: HDFS-17116. Reset startupTime and enterSafeModeTime if check time interval is negative during router safe mode exit check

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: common-issues-unsubscribe@hadoop.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-issues-help@hadoop.apache.org