wchevreuil commented on code in PR #6182:
URL: https://github.com/apache/hbase/pull/6182#discussion_r1736360907


##########
hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java:
##########
@@ -226,10 +226,19 @@ public void testHeapSizeChanges() throws Exception {
 
   public static void waitUntilFlushedToBucket(BucketCache cache, BlockCacheKey 
cacheKey)
     throws InterruptedException {
-    while (!cache.backingMap.containsKey(cacheKey) || 
cache.ramCache.containsKey(cacheKey)) {
-      Thread.sleep(100);
+    long timeout = 120000;
+    try {
+      while (!cache.backingMap.containsKey(cacheKey) || 
cache.ramCache.containsKey(cacheKey)) {
+        Thread.sleep(100);
+        if (timeout <= 0) {
+          break;
+        }
+        timeout -= 100;
+      }
+    } finally {
+      Thread.sleep(1000);

Review Comment:
   Just create one `HBaseConfiguration.create()` and pass along? Waiter only 
uses it to check for the `hbase.test.wait.for.ratio` property anyways.



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