dParikesit commented on code in PR #7995:
URL: https://github.com/apache/hbase/pull/7995#discussion_r3058161112


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/TestHFile.java:
##########
@@ -244,9 +244,10 @@ public void onLeak(String s, String s1) {
       Mockito.verify(cache).shouldCacheBlock(Mockito.any(), Mockito.anyLong(), 
Mockito.any());
       Mockito.verify(cache, Mockito.never()).cacheBlock(Mockito.any(), 
Mockito.any(),
         Mockito.anyBoolean(), Mockito.anyBoolean());
-      System.gc();
-      Thread.sleep(1000);
-      alloc.allocate(128 * 1024).release();
+      for (int i = 0; i < 15 && counter.get() == 0; i++) {
+        System.gc();
+        alloc.allocate(128 * 1024).release();
+      }

Review Comment:
   Thanks for the feedback! I believe the sleep should be done after we run 
allocate.release() right? I have updated the commit to change it.



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

Reply via email to