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:
parent
ac98087cc6
commit
ad771c741b
|
@ -343,6 +343,7 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2483 Some tests do not use ephemeral ports
|
HBASE-2483 Some tests do not use ephemeral ports
|
||||||
HBASE-2573 client.HConnectionManager$TableServers logs non-printable
|
HBASE-2573 client.HConnectionManager$TableServers logs non-printable
|
||||||
binary bytes (Benoît Sigoure via Stack)
|
binary bytes (Benoît Sigoure via Stack)
|
||||||
|
HBASE-2576 TestHRegion.testDelete_mixed() failing on hudson
|
||||||
|
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
|
|
|
@ -516,7 +516,7 @@ public class TestHRegion extends HBaseTestCase {
|
||||||
assertEquals("Family " +new String(family)+ " does exist", true, ok);
|
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 [] tableName = Bytes.toBytes("testtable");
|
||||||
byte [] fam = Bytes.toBytes("info");
|
byte [] fam = Bytes.toBytes("info");
|
||||||
byte [][] families = {fam};
|
byte [][] families = {fam};
|
||||||
|
@ -560,6 +560,9 @@ public class TestHRegion extends HBaseTestCase {
|
||||||
result = region.get(get, null);
|
result = region.get(get, null);
|
||||||
assertEquals(1, result.size());
|
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.
|
// Assert that after a delete, I can put.
|
||||||
put = new Put(row);
|
put = new Put(row);
|
||||||
put.add(fam, splitA, Bytes.toBytes("reference_A"));
|
put.add(fam, splitA, Bytes.toBytes("reference_A"));
|
||||||
|
@ -572,11 +575,10 @@ public class TestHRegion extends HBaseTestCase {
|
||||||
delete = new Delete(row);
|
delete = new Delete(row);
|
||||||
region.delete(delete, null, false);
|
region.delete(delete, null, false);
|
||||||
assertEquals(0, region.get(get, null).size());
|
assertEquals(0, region.get(get, null).size());
|
||||||
try {
|
|
||||||
|
// Sleep to ensure timestamp of next Put is bigger than previous delete
|
||||||
Thread.sleep(10);
|
Thread.sleep(10);
|
||||||
} catch (InterruptedException e) {
|
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
region.put(new Put(row).add(fam, splitA, Bytes.toBytes("reference_A")));
|
region.put(new Put(row).add(fam, splitA, Bytes.toBytes("reference_A")));
|
||||||
result = region.get(get, null);
|
result = region.get(get, null);
|
||||||
assertEquals(1, result.size());
|
assertEquals(1, result.size());
|
||||||
|
|
Loading…
Reference in New Issue