Skip to content

HBASE-29213 Fix timing in TestRegionNormalizerWorker.testRateLimit - #8764

Open
Sigma-Ma wants to merge 1 commit into
apache:masterfrom
Sigma-Ma:HBASE-29213-fix-normalizer-rate-limit-test-timing
Open

Sigma-Ma wants to merge 1 commit into
apache:masterfrom
Sigma-Ma:HBASE-29213-fix-normalizer-rate-limit-test-timing

Conversation

@Sigma-Ma

Copy link
Copy Markdown
Contributor

What changes were proposed in this pull request?

Start measuring elapsed time before constructing RegionNormalizerWorker.

Why are the changes needed?

The worker creates its RateLimiter during construction. Permits accumulated before the previous start timestamp could make the measured duration fall below five seconds and cause a false test failure.

How was this patch tested?

mvn -B -ntp -pl hbase-server -Dtest=TestRegionNormalizerWorker -Dsurefire.failIfNoSpecifiedTests=true -Dsurefire.rerunFailingTestsCount=0 -Dsurefire.skipSecondPart=true test

for run in {1..10}; do 
    mvn -B -ntp -pl hbase-server '-Dtest=TestRegionNormalizerWorker#testRateLimit' -Dsurefire.failIfNoSpecifiedTests=true -Dsurefire.rerunFailingTestsCount=0 surefire:test || break 
done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant