HBASE-30095 Remove duplicate MiniDFSCluster startup in TestZooKeeper - #8556
HBASE-30095 Remove duplicate MiniDFSCluster startup in TestZooKeeper#8556Sigma-Ma wants to merge 1 commit into
Conversation
|
This was intentionally added by @saintstack here 7df9490. Although I didn't get it, he can help us here. |
Thanks for pointing this out. I checked the original commit, and its message says the TestZooKeeper change was “probably useless” and that the actual issue was related to the ZooKeeper startup check hanging. The test already starts a MiniDFSCluster earlier in setUpBeforeClass, so the added line starts it twice on the same TEST_UTIL. That’s why this PR removes only the second call. @saintstack, please let me know if I’m missing any context here. |
|
Hi @haridsv, would you mind taking a look when you have time, or suggesting an appropriate reviewer? This is one of the remaining fixes split from HBASE-30073. Thanks! |
JIRA: https://issues.apache.org/jira/browse/HBASE-30095
What changes were proposed in this pull request?
Remove the duplicate
TEST_UTIL.startMiniDFSCluster(2)call fromTestZooKeeper#setUpBeforeClass.The first MiniDFSCluster startup is retained, preserving the intended test initialization sequence: start MiniDFSCluster, start MiniZooKeeper, configure the test environment, and then start MiniHBaseCluster for each test.
Why are the changes needed?
HBaseTestingUtilshould manage only one MiniDFSCluster at a time. CallingstartMiniDFSClustertwice replaces the storeddfsClusteranddfsClusterFixerreferences without shutting down the first cluster.This can leave the first cluster running against the same test directories and cause HDFS namespace conflicts, including
InconsistentFSStateException, in CI runs.How was this patch tested?
mvn -pl hbase-server -am -Dtest=TestZooKeeper -Dsurefire.rerunFailingTestsCount=0 test