adoroszlai commented on code in PR #3297:
URL: https://github.com/apache/ozone/pull/3297#discussion_r853140063
##########
hadoop-ozone/s3gateway/src/test/java/org/apache/hadoop/ozone/protocolPB/TestGrpcOmTransport.java:
##########
@@ -78,13 +78,16 @@ public void testStartStop() throws Exception {
UserGroupInformation ugi = UserGroupInformation.getCurrentUser();
GrpcOmTransport client = new GrpcOmTransport(conf, ugi, omServiceId);
+ Exception ex = null;
try {
client.start();
} catch (Exception e) {
+ ex = new Exception(ex);
e.printStackTrace();
} finally {
client.shutdown();
+ Assert.assertNull(ex);
Review Comment:
Same here.
##########
hadoop-ozone/ozone-manager/src/test/java/org/apache/hadoop/ozone/om/TestGrpcOzoneManagerServer.java:
##########
@@ -55,9 +57,11 @@ public void testStartStop() throws Exception {
try {
server.start();
} catch (Exception e) {
+ ex = new Exception(e);
e.printStackTrace();
} finally {
server.stop();
+ Assert.assertNull(ex);
Review Comment:
Nit: I think it's a bit too complicated. Simply not catching the exception
would cause the test to fail and let the test runner log the exception. Just
drop the `catch` block.
--
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]