@@ -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,7 +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 ,
289+       Waiter .waitFor (defaultConf , 10000 , 100 ,
290290        () -> (bucketCache .getBackingMap ().containsKey (key )));
291291    }
292292
@@ -298,7 +298,7 @@ public void testBlockEvictions() throws Exception {
298298    CacheTestUtils .HFileBlockPair [] newBlock  = CacheTestUtils .generateHFileBlocks (8192 , 1 );
299299
300300    bucketCache .cacheBlock (newKey , newBlock [0 ].getBlock ());
301-     Waiter .waitFor (defaultConf , 1000000 , 100 ,
301+     Waiter .waitFor (defaultConf , 10000 , 100 ,
302302      () -> (bucketCache .getBackingMap ().containsKey (newKey )));
303303
304304    // Verify that the bucket cache now contains 2 hot blocks blocks only. 
@@ -313,7 +313,7 @@ public void testBlockEvictions() throws Exception {
313313   */ 
314314  @ Test 
315315  public  void  testBlockEvictionsAllColdBlocks () throws  Exception  {
316-     long  capacitySize  = 64  * 1024 ;
316+     long  capacitySize  = 40  * 1024 ;
317317    int  writeThreads  = 3 ;
318318    int  writerQLen  = 64 ;
319319    int [] bucketSizes  = new  int [] { 8  * 1024  + 1024  };
@@ -337,7 +337,7 @@ public void testBlockEvictionsAllColdBlocks() throws Exception {
337337    for  (BlockCacheKey  key  : cacheKeys ) {
338338      bucketCache .cacheBlock (key , blocks [blocksIter ++].getBlock ());
339339      // Ensure that the block is persisted to the file. 
340-       Waiter .waitFor (defaultConf , 1000000 , 100 ,
340+       Waiter .waitFor (defaultConf , 10000 , 100 ,
341341        () -> (bucketCache .getBackingMap ().containsKey (key )));
342342    }
343343
@@ -349,7 +349,7 @@ public void testBlockEvictionsAllColdBlocks() throws Exception {
349349    CacheTestUtils .HFileBlockPair [] newBlock  = CacheTestUtils .generateHFileBlocks (8192 , 1 );
350350
351351    bucketCache .cacheBlock (newKey , newBlock [0 ].getBlock ());
352-     Waiter .waitFor (defaultConf , 1000000 , 100 ,
352+     Waiter .waitFor (defaultConf , 10000 , 100 ,
353353      () -> (bucketCache .getBackingMap ().containsKey (newKey )));
354354
355355    // Verify that the bucket cache now contains 1 cold block and a newly added hot block. 
@@ -361,7 +361,7 @@ public void testBlockEvictionsAllColdBlocks() throws Exception {
361361   */ 
362362  @ Test 
363363  public  void  testBlockEvictionsHotBlocks () throws  Exception  {
364-     long  capacitySize  = 64  * 1024 ;
364+     long  capacitySize  = 40  * 1024 ;
365365    int  writeThreads  = 3 ;
366366    int  writerQLen  = 64 ;
367367    int [] bucketSizes  = new  int [] { 8  * 1024  + 1024  };
@@ -385,7 +385,7 @@ public void testBlockEvictionsHotBlocks() throws Exception {
385385    for  (BlockCacheKey  key  : cacheKeys ) {
386386      bucketCache .cacheBlock (key , blocks [blocksIter ++].getBlock ());
387387      // Ensure that the block is persisted to the file. 
388-       Waiter .waitFor (defaultConf , 1000000 , 100 ,
388+       Waiter .waitFor (defaultConf , 10000 , 100 ,
389389        () -> (bucketCache .getBackingMap ().containsKey (key )));
390390    }
391391
@@ -397,7 +397,7 @@ public void testBlockEvictionsHotBlocks() throws Exception {
397397    CacheTestUtils .HFileBlockPair [] newBlock  = CacheTestUtils .generateHFileBlocks (8192 , 1 );
398398
399399    bucketCache .cacheBlock (newKey , newBlock [0 ].getBlock ());
400-     Waiter .waitFor (defaultConf , 1000000 , 100 ,
400+     Waiter .waitFor (defaultConf , 10000 , 100 ,
401401      () -> (bucketCache .getBackingMap ().containsKey (newKey )));
402402
403403    // Verify that the bucket cache now contains 2 hot blocks. 
0 commit comments