hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r814398 - in /hadoop/hbase/trunk: CHANGES.txt src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java
Date Sun, 13 Sep 2009 22:16:37 GMT
Author: stack
Date: Sun Sep 13 22:16:36 2009
New Revision: 814398

URL: http://svn.apache.org/viewvc?rev=814398&view=rev
Log:
HBASE-1835  Add more delete tests

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=814398&r1=814397&r2=814398&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Sun Sep 13 22:16:36 2009
@@ -45,6 +45,7 @@
                each daemon type
    HBASE-1823  Ability for Scanners to bypass the block cache
    HBASE-1827  Add disabling block cache scanner flag to the shell
+   HBASE-1835  Add more delete tests
 
   OPTIMIZATIONS
 

Modified: hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java?rev=814398&r1=814397&r2=814398&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java (original)
+++ hadoop/hbase/trunk/src/test/org/apache/hadoop/hbase/regionserver/TestHRegion.java Sun
Sep 13 22:16:36 2009
@@ -314,6 +314,27 @@
     get = new Get(row).addColumn(fam, splitB);
     result = region.get(get, null);
     assertEquals(1, result.size());
+
+    // Assert that after a delete, I can put.
+    put = new Put(row);
+    put.add(fam, splitA, Bytes.toBytes("reference_A"));
+    region.put(put);
+    get = new Get(row);
+    result = region.get(get, null);
+    assertEquals(3, result.size());
+    
+    // Now delete all... then test I can add stuff back
+    delete = new Delete(row);
+    region.delete(delete, null, false);
+    assertEquals(0, region.get(get, null).size());
+    try { 
+      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());
   }
   
   public void testDeleteRowWithFutureTs() throws IOException {



Mime
View raw message