[ https://issues.apache.org/jira/browse/HBASE-25680?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Duo Zhang updated HBASE-25680: ------------------------------ Component/s: test > Non-idempotent test in TestReplicationHFileCleaner > -------------------------------------------------- > > Key: HBASE-25680 > URL: https://issues.apache.org/jira/browse/HBASE-25680 > Project: HBase > Issue Type: Improvement > Components: test > Reporter: Zhengxi Li > Assignee: Zhengxi Li > Priority: Minor > Attachments: HBASE-25680.master.001.patch > > > The test > *{{org.apache.hadoop.hbase.master.cleaner.TestReplicationHFileCleaner.testIsFileDeletable}}* > is not idempotent and fail if run twice in the same JVM, because it pollutes > some states shared among tests. It may be good to clean this state pollution > so that some other tests do not fail in the future due to the shared state > polluted by this test. > h3. Detail > Running {{TestReplicationHFileCleaner.testIsFileDeletable}} twice would > result in the second run failing due to the following assertion error: > {noformat} > java.lang.AssertionError: Cleaner should allow to delete this file as there > is > no hfile reference node for it in the queue. > {noformat} > The root cause is that the a hfile reference is added during the first test > run, which doesn't get removed upon test exits. Therefore, in the second test > run , {{cleaner.isFileDeletable(fs.getFileStatus(file)))}} would return > {{false}}, resulting in the assertion error. > > PR link: https://github.com/apache/hbase/pull/2984 -- This message was sent by Atlassian Jira (v8.3.4#803005)