From 5ffb29688d130dabf2f015ee24b50af8e1d000aa Mon Sep 17 00:00:00 2001 From: Rajeshbabu Chintaguntla Date: Thu, 6 Oct 2022 11:14:23 +0530 Subject: [PATCH] HBASE-27365 Minimise block addition failures due to no space in bucket cache writers queue by introducing wait time - addendum fixing the test case failure --- .../hadoop/hbase/io/hfile/bucket/TestBucketCache.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java index a132673e846..ad381a665c3 100644 --- a/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java +++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/io/hfile/bucket/TestBucketCache.java @@ -813,11 +813,6 @@ public class TestBucketCache { } } - /** - * This test is for HBASE-26295, {@link BucketEntry} which is restored from a persistence file - * could not be freed even if corresponding {@link HFileBlock} is evicted from - * {@link BucketCache}. - */ @Test public void testBlockAdditionWaitWhenCache() throws Exception { try { @@ -845,7 +840,7 @@ public class TestBucketCache { while (bucketCache.backingMap.size() != 10) { if (timeout <= 0) break; Threads.sleep(100); - timeout = -100; + timeout -= 100; } for (HFileBlockPair hfileBlockPair : hfileBlockPairs) { assertTrue(bucketCache.backingMap.containsKey(hfileBlockPair.getBlockName()));