mehakmeet commented on code in PR #5780:
URL: https://github.com/apache/hadoop/pull/5780#discussion_r1243293768


##########
hadoop-tools/hadoop-azure/src/test/java/org/apache/hadoop/fs/azurebfs/services/ITestAbfsOutputStream.java:
##########
@@ -84,4 +88,34 @@ public void testMaxRequestsAndQueueCapacity() throws 
Exception {
     }
   }
 
+  /**
+   * Verify the passing of AzureBlobFileSystem reference to AbfsOutputStream
+   * to make sure that the FS instance is not eligible for GC.
+   *
+   */
+  @Test
+  public void testAzureBlobFileSystemBackReferenceInOutputStream()
+      throws Exception {

Review Comment:
   I don't think we can explicitly force a GC, in the test that I performed, it 
required the FS instance to be left alone in a separate thread and after 
sleeping for some time, we can use `System.gc()` which only points/suggests a 
GC, which did call the `finalize()`, however, I am not sure if this would work 
in every system per se, since it would depend on the resources available as 
well at the time.



-- 
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]

Reply via email to