Xushaohong commented on code in PR #3927:
URL: https://github.com/apache/ozone/pull/3927#discussion_r1012527681
##########
hadoop-ozone/recon/src/test/java/org/apache/hadoop/ozone/recon/spi/impl/TestOzoneManagerServiceProviderImpl.java:
##########
@@ -441,6 +478,17 @@ private OzoneManagerProtocol getMockOzoneManagerClient(
return ozoneManagerProtocolMock;
}
+ // Mock the case of SNNFE
+ private OzoneManagerProtocol getMockOzoneManagerClientWithThrow()
+ throws IOException {
+ OzoneManagerProtocol ozoneManagerProtocolMock =
+ mock(OzoneManagerProtocol.class);
+ when(ozoneManagerProtocolMock.getDBUpdates(any(OzoneManagerProtocolProtos
+ .DBUpdatesRequest.class)))
+ .thenThrow(new SequenceNumberNotFoundException());
Review Comment:
Actually, the sync request is sent through client protocol, and recon would
create an IOException instead of SequenceNumberNotFoundException when receiving
the response from OM.
Here is for a clear case statement, maybe the exception conversion could be
implemented someday with specific **ResultCode**
--
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]