[ https://issues.apache.org/jira/browse/HBASE-21173?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16608389#comment-16608389 ]
Guangxu Cheng commented on HBASE-21173: --------------------------------------- Attach 002 patch as [~yuzhih...@gmail.com] [~liuml07] suggestions.Thanks {{testSequenceId}} - In line 269, Replace region.close() with HBaseTestingUtility.closeRegionAndWAL(region) - In line 285, we need to verify that the value of region.getMaxFlushedSeqId() is consistent before and after region.close(), so we keep region.close() and replace it with HBaseTestingUtility.closeRegionAndWAL(region). {{testCloseCarryingSnapshot}} - In line 315, replace region.close() with HBaseTestingUtility.closeRegionAndWAL(region) - In line 317, remove duplicate HBaseTestingUtility.closeRegionAndWAL(region) and set this.region to null {{testCloseWithFailingFlush}} - In line 578, replace region.close() with HBaseTestingUtility.closeRegionAndWAL(region) and set this.region to null {{testRecoveredEditsReplayCompaction}} - In line 951, replace region.close() with HBaseTestingUtility.closeRegionAndWAL(region) {{testFlushMarkers}} - In line 1083, replace region.close() with HBaseTestingUtility.closeRegionAndWAL(region) {{testGetWhileRegionClose}} - In line 1281, set this.region to null {{testBatchPut_whileMultipleRowLocksHeld}} - In line 1281, set this.region to null {{testRegionInfoFileCreation}} - In line 4175, keep region.close() and set region to null as said by Mingliang Liu {{testBulkLoadReplicationEnabled}} - In line 6234, remove region.close() {quote}Other places to set this.region null value after HTU.closeRegionAndWAL() is good to explicitly make the HTU.closeRegionAndWAL() in tearDown a no-op. {quote} Other places where set this.region null value after HTU.closeRegionAndWAL(), will be fine as said by [~liuml07]. > Remove the duplicate HRegion#close in TestHRegion > ------------------------------------------------- > > Key: HBASE-21173 > URL: https://issues.apache.org/jira/browse/HBASE-21173 > Project: HBase > Issue Type: Bug > Components: test > Affects Versions: 3.0.0, 2.2.0 > Reporter: Guangxu Cheng > Assignee: Guangxu Cheng > Priority: Major > Attachments: HBASE-21173.master.001.patch, > HBASE-21173.master.002.patch > > > After HBASE-21138, some test methods still have the duplicate > HRegion#close.So open this issue to remove the duplicate close -- This message was sent by Atlassian JIRA (v7.6.3#76005)