commit 51847b2a060ab5f95a6bbf9c4a3b1a7bb305c95f Author: Todd Lipcon Date: Sun Jun 20 17:42:42 2010 -0700 HBASE-2757. Fix flaky TestFromClientSide test diff --git src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java index c687f5a..29f2114 100644 --- src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java +++ src/test/java/org/apache/hadoop/hbase/client/TestFromClientSide.java @@ -3637,7 +3637,13 @@ public class TestFromClientSide { // create many regions for the table. TEST_UTIL.createMultiRegions(table, FAMILY); - + // This count effectively waits until the regions have been + // fully assigned + TEST_UTIL.countRows(table); + table.getConnection().clearRegionCache(); + assertEquals("Clearing cache should have 0 cached ", 0, + HConnectionManager.getCachedRegionCount(conf, TABLENAME)); + // A Get is suppose to do a region lookup request Get g = new Get(Bytes.toBytes("aaa")); table.get(g);