sadanand48 commented on code in PR #10862:
URL: https://github.com/apache/ozone/pull/10862#discussion_r3711961341


##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestOMDBCheckpointServletInodeBasedXferNonLeader.java:
##########
@@ -77,4 +81,35 @@ void 
processMetadataSnapshotRequestSetsStatusWhenSendErrorFails() throws Excepti
 
     verify(response).setStatus(HttpServletResponse.SC_SERVICE_UNAVAILABLE);
   }
+
+  @ParameterizedTest
+  @ValueSource(booleans = {false, true})
+  void processMetadataSnapshotRequestDoesNotReturn503WhenLeader(boolean 
isLeaderReady) throws Exception {
+    OMDBCheckpointServletInodeBasedXfer servlet =
+        spy(new OMDBCheckpointServletInodeBasedXfer());
+    OzoneManager om = mock(OzoneManager.class);
+    when(om.isLeader()).thenReturn(true);
+    when(om.isLeaderReady()).thenReturn(isLeaderReady);

Review Comment:
   This is what I wanted to assert i.e the isLeaderReady being true or false 
has no impact on the OM bootstrap request if isLeader is already true.



-- 
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]

Reply via email to