hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ted Yu (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-21138) Close HRegion instance at the end of every test in TestHRegion
Date Fri, 31 Aug 2018 22:01:00 GMT
Ted Yu created HBASE-21138:
------------------------------

             Summary: 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


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)

Mime
View raw message