@@ -262,7 +262,7 @@ public void testPickColdDataFiles() {
262262 */
263263 @ Test
264264 public void testBlockEvictions () throws Exception {
265- long capacitySize = 64 * 1024 ;
265+ long capacitySize = 40 * 1024 ;
266266 int writeThreads = 3 ;
267267 int writerQLen = 64 ;
268268 int [] bucketSizes = new int [] { 8 * 1024 + 1024 };
@@ -286,8 +286,7 @@ public void testBlockEvictions() throws Exception {
286286 for (BlockCacheKey key : cacheKeys ) {
287287 bucketCache .cacheBlock (key , blocks [blocksIter ++].getBlock ());
288288 // Ensure that the block is persisted to the file.
289- Waiter .waitFor (defaultConf , 1000000 , 100 ,
290- () -> (bucketCache .getBackingMap ().containsKey (key )));
289+ Waiter .waitFor (defaultConf , 10000 , 100 , () -> (bucketCache .getBackingMap ().containsKey (key )));
291290 }
292291
293292 // Verify that the bucket cache contains 3 blocks.
@@ -298,7 +297,7 @@ public void testBlockEvictions() throws Exception {
298297 CacheTestUtils .HFileBlockPair [] newBlock = CacheTestUtils .generateHFileBlocks (8192 , 1 );
299298
300299 bucketCache .cacheBlock (newKey , newBlock [0 ].getBlock ());
301- Waiter .waitFor (defaultConf , 1000000 , 100 ,
300+ Waiter .waitFor (defaultConf , 10000 , 100 ,
302301 () -> (bucketCache .getBackingMap ().containsKey (newKey )));
303302
304303 // Verify that the bucket cache now contains 2 hot blocks blocks only.
@@ -313,7 +312,7 @@ public void testBlockEvictions() throws Exception {
313312 */
314313 @ Test
315314 public void testBlockEvictionsAllColdBlocks () throws Exception {
316- long capacitySize = 64 * 1024 ;
315+ long capacitySize = 40 * 1024 ;
317316 int writeThreads = 3 ;
318317 int writerQLen = 64 ;
319318 int [] bucketSizes = new int [] { 8 * 1024 + 1024 };
@@ -337,8 +336,7 @@ public void testBlockEvictionsAllColdBlocks() throws Exception {
337336 for (BlockCacheKey key : cacheKeys ) {
338337 bucketCache .cacheBlock (key , blocks [blocksIter ++].getBlock ());
339338 // Ensure that the block is persisted to the file.
340- Waiter .waitFor (defaultConf , 1000000 , 100 ,
341- () -> (bucketCache .getBackingMap ().containsKey (key )));
339+ Waiter .waitFor (defaultConf , 10000 , 100 , () -> (bucketCache .getBackingMap ().containsKey (key )));
342340 }
343341
344342 // Verify that the bucket cache contains 3 blocks.
@@ -349,7 +347,7 @@ public void testBlockEvictionsAllColdBlocks() throws Exception {
349347 CacheTestUtils .HFileBlockPair [] newBlock = CacheTestUtils .generateHFileBlocks (8192 , 1 );
350348
351349 bucketCache .cacheBlock (newKey , newBlock [0 ].getBlock ());
352- Waiter .waitFor (defaultConf , 1000000 , 100 ,
350+ Waiter .waitFor (defaultConf , 10000 , 100 ,
353351 () -> (bucketCache .getBackingMap ().containsKey (newKey )));
354352
355353 // Verify that the bucket cache now contains 1 cold block and a newly added hot block.
@@ -361,7 +359,7 @@ public void testBlockEvictionsAllColdBlocks() throws Exception {
361359 */
362360 @ Test
363361 public void testBlockEvictionsHotBlocks () throws Exception {
364- long capacitySize = 64 * 1024 ;
362+ long capacitySize = 40 * 1024 ;
365363 int writeThreads = 3 ;
366364 int writerQLen = 64 ;
367365 int [] bucketSizes = new int [] { 8 * 1024 + 1024 };
@@ -385,8 +383,7 @@ public void testBlockEvictionsHotBlocks() throws Exception {
385383 for (BlockCacheKey key : cacheKeys ) {
386384 bucketCache .cacheBlock (key , blocks [blocksIter ++].getBlock ());
387385 // Ensure that the block is persisted to the file.
388- Waiter .waitFor (defaultConf , 1000000 , 100 ,
389- () -> (bucketCache .getBackingMap ().containsKey (key )));
386+ Waiter .waitFor (defaultConf , 10000 , 100 , () -> (bucketCache .getBackingMap ().containsKey (key )));
390387 }
391388
392389 // Verify that the bucket cache contains 3 blocks.
@@ -397,7 +394,7 @@ public void testBlockEvictionsHotBlocks() throws Exception {
397394 CacheTestUtils .HFileBlockPair [] newBlock = CacheTestUtils .generateHFileBlocks (8192 , 1 );
398395
399396 bucketCache .cacheBlock (newKey , newBlock [0 ].getBlock ());
400- Waiter .waitFor (defaultConf , 1000000 , 100 ,
397+ Waiter .waitFor (defaultConf , 10000 , 100 ,
401398 () -> (bucketCache .getBackingMap ().containsKey (newKey )));
402399
403400 // Verify that the bucket cache now contains 2 hot blocks.
0 commit comments