eramitmittal commented on code in PR #43551:
URL: https://github.com/apache/arrow/pull/43551#discussion_r1743325808


##########
java/flight/flight-integration-tests/src/test/java/org/apache/arrow/flight/integration/tests/IntegrationTest.java:
##########
@@ -114,6 +124,8 @@ void testScenario(String scenarioName) throws Exception {
           scenario.client(allocator, location, client);
         }
       }
+      exec.shutdown();
+      final boolean unused = exec.awaitTermination(3, TimeUnit.SECONDS);

Review Comment:
   adding:
   
   ```
         // Shutdown the executor while allowing existing tasks to finish.
         // Without this wait, allocator.close() may get invoked earlier than 
an executor thread may
         // have finished freeing up resources
         // In that case, allocator.close() can throw an IllegalStateException 
for memory leak, leading
         // to flaky tests
   ```



-- 
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: github-unsubscr...@arrow.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to