Uploaded image for project: 'HBase'
  1. HBase
  2. HBASE-21138

Close HRegion instance at the end of every test in TestHRegion

    XMLWordPrintableJSON

Details

    • Test
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 3.0.0-alpha-1, 1.3.3, 2.2.0, 1.4.8
    • None
    • None
    • Reviewed

    Description

      TestHRegion has over 100 tests.
      The following is from one subtest:

        public void testCompactionAffectedByScanners() throws Exception {
          byte[] family = Bytes.toBytes("family");
          this.region = initHRegion(tableName, method, CONF, family);
      

      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:

          } finally {
            HBaseTestingUtility.closeRegionAndWAL(this.region);
      

      Attachments

        1. HBASE-21138.branch-1.004.patch
          205 kB
          Mingliang Liu
        2. HBASE-21138.branch-2.004.patch
          192 kB
          Mingliang Liu
        3. HBASE-21138.004.patch
          192 kB
          Mingliang Liu
        4. HBASE-21138.branch-1.004.patch
          205 kB
          Mingliang Liu
        5. HBASE-21138.003.patch
          192 kB
          Mingliang Liu
        6. HBASE-21138.002.patch
          192 kB
          Mingliang Liu
        7. HBASE-21138.001.patch
          192 kB
          Mingliang Liu
        8. HBASE-21138.000.patch
          1 kB
          Mingliang Liu

        Issue Links

          Activity

            People

              liuml07 Mingliang Liu
              yuzhihong@gmail.com Ted Yu
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: