Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HBASE-27720 TestClusterRestartFailover is flakey due to metrics assertion #5110

Merged
merged 1 commit into from
Apr 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,12 @@ private void setupCluster() throws Exception {
LOG.info("Setup cluster");
UTIL.startMiniCluster(StartTestingClusterOption.builder().masterClass(HMasterForTest.class)
.numMasters(1).numRegionServers(3).build());
// this test has been flaky. When it is rerun by surefire, the underlying minicluster isn't
// completely cleaned. specifically, the metrics system isn't reset. The result is an otherwise
// successful re-run is failed because there's 8 or 12 SCPcounts instead of the 4 that a
// single run of the test would otherwise produce. Thus, explicitly reset the metrics source
// each time we setup the cluster.
UTIL.getMiniHBaseCluster().getMaster().getMasterMetrics().getMetricsSource().init();
LOG.info("Cluster is up");
UTIL.waitFor(60000, () -> UTIL.getMiniHBaseCluster().getMaster().isInitialized());
LOG.info("Master is up");
Expand Down