HBASE-3665 tighten assertions for testBloomFilterSize

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1082653 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nicolas Spiegelberg 2011-03-17 19:26:51 +00:00
parent b9e1d6c698
commit 8a386e758e
1 changed files with 5 additions and 1 deletions

View File

@ -2794,11 +2794,12 @@ public class TestHRegion extends HBaseTestCase {
int duplicate_multiplier =2;
int num_storefiles = 4;
int version = 0;
for (int f =0 ; f < num_storefiles; f++) {
for (int i = 0; i < duplicate_multiplier; i ++) {
for (int j = 0; j < num_unique_rows; j++) {
Put put = new Put(Bytes.toBytes("row" + j));
put.add(fam1, qf1, val1);
put.add(fam1, qf1, version++, val1);
region.put(put);
}
}
@ -2811,6 +2812,7 @@ public class TestHRegion extends HBaseTestCase {
StoreFile.Reader reader = storefile.getReader();
reader.loadFileInfo();
reader.loadBloomfilter();
assertEquals(num_unique_rows*duplicate_multiplier, reader.getEntries());
assertEquals(num_unique_rows, reader.getFilterEntries());
}
@ -2822,6 +2824,8 @@ public class TestHRegion extends HBaseTestCase {
StoreFile.Reader reader = storefile.getReader();
reader.loadFileInfo();
reader.loadBloomfilter();
assertEquals(num_unique_rows*duplicate_multiplier*num_storefiles,
reader.getEntries());
assertEquals(num_unique_rows, reader.getFilterEntries());
}
}