devmadhuu commented on code in PR #10116:
URL: https://github.com/apache/ozone/pull/10116#discussion_r3145058191
##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconContainerEndpoint.java:
##########
Review Comment:
Can we fix here also ?
##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconContainerEndpoint.java:
##########
@@ -77,11 +83,15 @@ public void init() throws Exception {
@AfterEach
public void shutdown() throws IOException {
- if (client != null) {
- client.close();
- }
- if (cluster != null) {
- cluster.shutdown();
+ try {
+ if (client != null) {
+ client.close();
+ }
+ if (cluster != null) {
+ cluster.shutdown();
+ }
+ } finally {
+ ContainerKeyMapperHelper.clearSharedContainerCountMap();
Review Comment:
If any error in closing the client, this will still clear the map, but
cluster shutdown may skip. Not a very good resource handling. Can
`IOUtils.closeQuietly` help ?
##########
hadoop-ozone/integration-test-recon/src/test/java/org/apache/hadoop/ozone/recon/TestReconContainerEndpoint.java:
##########
@@ -117,6 +127,9 @@ public void testContainerEndpointForFSOLayout() throws
Exception {
CompletableFuture<Void> completableFuture =
omMetaManagerUtils.waitForEventBufferEmpty(reconTaskController.getEventBuffer());
GenericTestUtils.waitFor(completableFuture::isDone, 100, 30000);
+ completableFuture.join();
+ // The buffer can be empty while tasks still finish processing a dequeued
batch.
+ Thread.sleep(2000);
Review Comment:
Lets avoid `Thread.sleep`
--
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]