hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r996255 - /hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
Date Sun, 12 Sep 2010 05:44:37 GMT
Author: stack
Date: Sun Sep 12 05:44:36 2010
New Revision: 996255

URL: http://svn.apache.org/viewvc?rev=996255&view=rev
Log:
HBASE-2720 TestFromClientSide fails for client region cache prewarm on Hudson

Modified:
    hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java

Modified: hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java
URL: http://svn.apache.org/viewvc/hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java?rev=996255&r1=996254&r2=996255&view=diff
==============================================================================
--- hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java (original)
+++ hbase/trunk/src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java Sun Sep
12 05:44:36 2010
@@ -3829,20 +3829,20 @@ public class TestFromClientSide {
     Get g2 = new Get(Bytes.toBytes("bbb"));
     table.get(g2);
 
-    // Get the configured number of cache read-ahead regions.  For various
-    // reasons, the meta may not yet have all regions in place (e.g. hbase-2757). 
-    // That the prefetch gets at least half shows prefetch is bascially working.
-    int prefetchRegionNumber = conf.getInt("hbase.client.prefetch.limit", 10) / 2;
+    // Get the configured number of cache read-ahead regions.
+    int prefetchRegionNumber = conf.getInt("hbase.client.prefetch.limit", 10);
 
     // the total number of cached regions == region('aaa") + prefeched regions.
     LOG.info("Testing how many regions cached");
-    assertTrue(prefetchRegionNumber < HConnectionManager.getCachedRegionCount(conf, TABLENAME));
+    assertEquals("Number of cached region is incorrect ", prefetchRegionNumber,
+        HConnectionManager.getCachedRegionCount(conf, TABLENAME));
 
     table.getConnection().clearRegionCache();
 
     Get g3 = new Get(Bytes.toBytes("abc"));
     table.get(g3);
-    assertTrue(prefetchRegionNumber < HConnectionManager.getCachedRegionCount(conf, TABLENAME));
+    assertEquals("Number of cached region is incorrect ", prefetchRegionNumber,
+        HConnectionManager.getCachedRegionCount(conf, TABLENAME));
 
     LOG.info("Finishing testRegionCachePreWarm");
   }



Mime
View raw message