You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by te...@apache.org on 2014/03/29 01:54:23 UTC

svn commit: r1582927 - /hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java

Author: tedyu
Date: Sat Mar 29 00:54:23 2014
New Revision: 1582927

URL: http://svn.apache.org/r1582927
Log:
HBASE-10868 TestAtomicOperation should close HRegion instance after each subtest


Modified:
    hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java

Modified: hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java?rev=1582927&r1=1582926&r2=1582927&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java (original)
+++ hbase/trunk/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestAtomicOperation.java Sat Mar 29 00:54:23 2014
@@ -63,6 +63,7 @@ import org.apache.hadoop.hbase.filter.Co
 import org.apache.hadoop.hbase.io.HeapSize;
 import org.apache.hadoop.hbase.regionserver.wal.HLog;
 import org.apache.hadoop.hbase.util.Bytes;
+import org.junit.After;
 import org.junit.Before;
 import org.junit.Rule;
 import org.junit.Test;
@@ -97,6 +98,13 @@ public class TestAtomicOperation {
     tableName = Bytes.toBytes(name.getMethodName());
   }
   
+  @After
+  public void teardown() throws IOException {
+    if (region != null) {
+      region.close();
+      region = null;
+    }
+  }
   //////////////////////////////////////////////////////////////////////////////
   // New tests that doesn't spin up a mini cluster but rather just test the
   // individual code pieces in the HRegion. 
@@ -641,4 +649,4 @@ public class TestAtomicOperation {
       }
     }
   }
-}
\ No newline at end of file
+}