HBASE-2576 TestHRegion.testDelete_mixed() failing on hudson

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@946490 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Gray 2010-05-20 00:08:56 +00:00
parent ac98087cc6
commit ad771c741b
2 changed files with 9 additions and 6 deletions

View File

@ -343,6 +343,7 @@ Release 0.21.0 - Unreleased
HBASE-2483 Some tests do not use ephemeral ports
HBASE-2573 client.HConnectionManager$TableServers logs non-printable
binary bytes (Benoît Sigoure via Stack)
HBASE-2576 TestHRegion.testDelete_mixed() failing on hudson
IMPROVEMENTS

View File

@ -516,7 +516,7 @@ public class TestHRegion extends HBaseTestCase {
assertEquals("Family " +new String(family)+ " does exist", true, ok);
}
public void testDelete_mixed() throws IOException {
public void testDelete_mixed() throws IOException, InterruptedException {
byte [] tableName = Bytes.toBytes("testtable");
byte [] fam = Bytes.toBytes("info");
byte [][] families = {fam};
@ -560,6 +560,9 @@ public class TestHRegion extends HBaseTestCase {
result = region.get(get, null);
assertEquals(1, result.size());
// Sleep to ensure timestamp of next Put is bigger than previous delete
Thread.sleep(10);
// Assert that after a delete, I can put.
put = new Put(row);
put.add(fam, splitA, Bytes.toBytes("reference_A"));
@ -572,11 +575,10 @@ public class TestHRegion extends HBaseTestCase {
delete = new Delete(row);
region.delete(delete, null, false);
assertEquals(0, region.get(get, null).size());
try {
// Sleep to ensure timestamp of next Put is bigger than previous delete
Thread.sleep(10);
} catch (InterruptedException e) {
e.printStackTrace();
}
region.put(new Put(row).add(fam, splitA, Bytes.toBytes("reference_A")));
result = region.get(get, null);
assertEquals(1, result.size());