HBASE-2757. Fix flaky TestFromClientSide test by forcing region assignment

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@956716 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Todd Lipcon 2010-06-21 22:01:25 +00:00
parent 52ae2e469b
commit ca2f1678d7
2 changed files with 8 additions and 1 deletions

View File

@ -403,6 +403,7 @@ Release 0.21.0 - Unreleased
HBASE-2760 Fix MetaScanner TableNotFoundException when scanning starting at
the first row in a table.
HBASE-1025 Reconstruction log playback has no bounds on memory used
HBASE-2757 Fix flaky TestFromClientSide test by forcing region assignment
IMPROVEMENTS
HBASE-1760 Cleanup TODOs in HTable

View File

@ -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);