hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject svn commit: r1514770 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileBlockCacheSummary.java
Date Fri, 16 Aug 2013 16:16:05 GMT
Author: tedyu
Date: Fri Aug 16 16:16:04 2013
New Revision: 1514770

URL: http://svn.apache.org/r1514770
Log:
HBASE-9239 TestStoreFileBlockCacheSummary#testBlockCacheSummary occasionally fails (Ted Yu)


Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileBlockCacheSummary.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileBlockCacheSummary.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileBlockCacheSummary.java?rev=1514770&r1=1514769&r2=1514770&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileBlockCacheSummary.java
(original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestStoreFileBlockCacheSummary.java
Fri Aug 16 16:16:04 2013
@@ -19,6 +19,7 @@
 package org.apache.hadoop.hbase.regionserver;
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -109,13 +110,13 @@ public class TestStoreFileBlockCacheSumm
      bc.getBlockCacheColumnFamilySummaries(TEST_UTIL.getConfiguration());
    LOG.info("blockCacheSummary: " + bcs);
 
-   assertEquals("blockCache summary has entries", 2, bcs.size());
+   assertTrue("blockCache summary has " + bcs.size() + " entries", bcs.size() >= 2);
 
-   BlockCacheColumnFamilySummary e = bcs.get(0);
+   BlockCacheColumnFamilySummary e = bcs.get(bcs.size()-2);
    assertEquals("table", TEST_TABLE, e.getTable());
    assertEquals("cf", TEST_CF, e.getColumnFamily());
 
-   e = bcs.get(1);
+   e = bcs.get(bcs.size()-1);
    assertEquals("table", TEST_TABLE2, e.getTable());
    assertEquals("cf", TEST_CF, e.getColumnFamily());
 



Mime
View raw message