[
https://issues.apache.org/jira/browse/HBASE-21138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16599346#comment-16599346
]
Ted Yu commented on HBASE-21138:
--------------------------------
{code}
254 LOG.error("Error in closing region {}", region, e);
{code}
In the existing call to HBaseTestingUtility.closeRegionAndWAL(), exception
surfaces - meaning the test would fail.
We should keep the same behavior.
{code}
public void testSequenceId() throws IOException {
HRegion region = initHRegion(tableName, method, CONF, COLUMN_FAMILY_BYTES);
{code}
Do you mind searching the test for code such as above ?
Some tests don't use the region member variable to store instance.
thanks
> Close HRegion instance at the end of every test in TestHRegion
> --------------------------------------------------------------
>
> Key: HBASE-21138
> URL: https://issues.apache.org/jira/browse/HBASE-21138
> Project: HBase
> Issue Type: Test
> Reporter: Ted Yu
> Assignee: Mingliang Liu
> Priority: Major
> Attachments: HBASE-21138.000.patch
>
>
> TestHRegion has over 100 tests.
> The following is from one subtest:
> {code}
> public void testCompactionAffectedByScanners() throws Exception {
> byte[] family = Bytes.toBytes("family");
> this.region = initHRegion(tableName, method, CONF, family);
> {code}
> this.region is not closed at the end of the subtest.
> testToShowNPEOnRegionScannerReseek is another example.
> Every subtest should use the following construct toward the end:
> {code}
> } finally {
> HBaseTestingUtility.closeRegionAndWAL(this.region);
> {code}
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)