adoroszlai commented on code in PR #10116:
URL: https://github.com/apache/ozone/pull/10116#discussion_r3193766623
##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconContainerEndpoint.java:
##########
@@ -77,11 +87,13 @@ public void init() throws Exception {
@AfterEach
public void shutdown() throws IOException {
- if (client != null) {
- client.close();
- }
- if (cluster != null) {
- cluster.shutdown();
+ try {
+ IOUtils.closeQuietly(client);
+ if (cluster != null) {
+ cluster.shutdown();
+ }
Review Comment:
nit: we can close cluster, too
```suggestion
IOUtils.closeQuietly(client, cluster);
```
Also, `try-finally` becomes unnecessary, since `closeQuietly` catches
exceptions.
--
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]