HBASE-10868 TestAtomicOperation should close HRegion instance after each subtest

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1582927 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Zhihong Yu 2014-03-29 00:54:23 +00:00
parent 026e89af76
commit 177bbff391
1 changed files with 9 additions and 1 deletions

View File

@ -63,6 +63,7 @@ import org.apache.hadoop.hbase.filter.CompareFilter.CompareOp;
import org.apache.hadoop.hbase.io.HeapSize; import org.apache.hadoop.hbase.io.HeapSize;
import org.apache.hadoop.hbase.regionserver.wal.HLog; import org.apache.hadoop.hbase.regionserver.wal.HLog;
import org.apache.hadoop.hbase.util.Bytes; import org.apache.hadoop.hbase.util.Bytes;
import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Rule; import org.junit.Rule;
import org.junit.Test; import org.junit.Test;
@ -97,6 +98,13 @@ public class TestAtomicOperation {
tableName = Bytes.toBytes(name.getMethodName()); 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 // New tests that doesn't spin up a mini cluster but rather just test the
// individual code pieces in the HRegion. // individual code pieces in the HRegion.
@ -641,4 +649,4 @@ public class TestAtomicOperation {
} }
} }
} }
} }