Skip to content

HBASE-30039 Upgrade hbase-server to use junit5 Part3 (#7999)#8065

Merged
liuxiaocs7 merged 1 commit intoapache:branch-2from
liuxiaocs7:HBASE-30039-branch-2
Apr 16, 2026
Merged

HBASE-30039 Upgrade hbase-server to use junit5 Part3 (#7999)#8065
liuxiaocs7 merged 1 commit intoapache:branch-2from
liuxiaocs7:HBASE-30039-branch-2

Conversation

@liuxiaocs7
Copy link
Copy Markdown
Member

@liuxiaocs7 liuxiaocs7 added the backport This PR is a back port of some issue or issues already committed to master label Apr 11, 2026
@liuxiaocs7 liuxiaocs7 marked this pull request as draft April 11, 2026 13:28
@liuxiaocs7 liuxiaocs7 force-pushed the HBASE-30039-branch-2 branch from 4abd675 to 420525e Compare April 13, 2026 18:40
@liuxiaocs7 liuxiaocs7 marked this pull request as ready for review April 13, 2026 18:42
@liuxiaocs7 liuxiaocs7 marked this pull request as draft April 13, 2026 18:42
@liuxiaocs7 liuxiaocs7 marked this pull request as ready for review April 13, 2026 18:42
@liuxiaocs7 liuxiaocs7 force-pushed the HBASE-30039-branch-2 branch 2 times, most recently from 18ec090 to 9dea567 Compare April 14, 2026 09:59
@liuxiaocs7 liuxiaocs7 requested a review from Copilot April 14, 2026 10:04
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR continues the HBASE-30039 effort on branch-2 by migrating quota-related tests in hbase-server from JUnit 4 to JUnit 5 (Jupiter).

Changes:

  • Replace JUnit4 annotations/rules/categories with JUnit5 @Test, lifecycle annotations, and @Tag.
  • Update assertions to JUnit5 equivalents (including assertThrows and message-argument ordering).
  • Replace usages of TestName rule with TestInfo-derived names and update SpaceQuotaHelperForTests to accept a String test name.

Reviewed changes

Copilot reviewed 55 out of 55 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/policies/TestNoWritesViolationPolicyEnforcement.java Migrate policy enforcement unit test to JUnit5 (@Tag, @BeforeEach, assertThrows).
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/policies/TestNoWritesCompactionsViolationPolicyEnforcement.java Migrate policy enforcement unit test to JUnit5 (@Tag, @BeforeEach, assertThrows).
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/policies/TestNoInsertsViolationPolicyEnforcement.java Migrate policy enforcement unit test to JUnit5 (@Tag, @BeforeEach, assertThrows).
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/policies/TestDisableTableViolationPolicyEnforcement.java Migrate policy enforcement unit test to JUnit5 (@Tag, @BeforeEach, assertThrows).
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/policies/TestBulkLoadCheckingViolationPolicyEnforcement.java Migrate bulk-load policy checks test to JUnit5 and use assertThrows.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestTablesWithQuotas.java Migrate non-minicluster quota table classification test to JUnit5 assertions and tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestTableSpaceQuotaViolationNotifier.java Migrate notifier test to JUnit5 lifecycle and tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestTableQuotaViolationStore.java Migrate snapshot store test to JUnit5 lifecycle, assertions, and tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSuperUserQuotaPermissions.java Migrate minicluster permissions test to JUnit5 lifecycle/tags and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotasWithSnapshots.java Migrate snapshot space-quota integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotasWithRegionReplicas.java Migrate region-replica quota integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotas.java Migrate end-to-end space quota test to JUnit5; replace TestName usage with TestInfo in test methods.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaViolationPolicyRefresherChore.java Migrate refresher chore unit test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaSwitchPolicies.java Migrate policy switching integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaRemoval.java Migrate quota removal integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaOnNonExistingTables.java Migrate non-existing table quota test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaOnBulkLoad.java Migrate bulkload quota integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaIncrease.java Migrate quota increase integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaDropTable.java Migrate quota-drop-table integration test to JUnit5 assertions/lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotaBasicFunctioning.java Migrate basic space quota integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSnapshotQuotaObserverChore.java Migrate snapshot observer chore integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRegionSizeUse.java Migrate region size reporting integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRegionSizeStoreImpl.java Migrate region size store unit test to JUnit5 assertions/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRegionSizeReportingChore.java Migrate reporting chore unit test to JUnit5 assertions/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRegionSizeImpl.java Migrate region size unit test to JUnit5 assertions/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRegionServerSpaceQuotaManager.java Migrate regionserver quota manager unit test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestRateLimiter.java Migrate rate limiter tests to JUnit5 assertions and @Tag.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaUserOverride.java Migrate quota override integration test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaThrottle.java Migrate throttling test to JUnit5 (@Disabled, lifecycle, tags) and assertions.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaTableUtil.java Migrate quota table util integration tests to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaStatusRPCs.java Migrate quota status RPC integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaState.java Migrate quota state unit test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaObserverChoreWithMiniCluster.java Migrate quota observer minicluster integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaObserverChoreRegionReports.java Migrate region report retention integration test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaObserverChore.java Migrate non-minicluster quota observer unit test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaCache2.java Migrate quota cache unit test to JUnit5 assertions/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaCache.java Migrate quota cache minicluster test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestQuotaAdmin.java Migrate quota admin minicluster tests to JUnit5 lifecycle/tags and assertions.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestNamespaceQuotaViolationStore.java Migrate namespace snapshot store unit test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestMasterQuotasObserverWithMocks.java Migrate mock-based master quotas observer unit test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestMasterQuotasObserver.java Migrate master quotas observer integration tests to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestMasterQuotaManager.java Migrate master quota manager unit test to JUnit5 assertions/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestLowLatencySpaceQuotas.java Migrate low-latency quota integration tests to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestGlobalQuotaSettingsImpl.java Migrate global quota settings unit test to JUnit5 assertions/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileSystemUtilizationChore.java Migrate FS utilization chore unit test to JUnit5 assertions/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFileArchiverNotifierImpl.java Migrate file archiver notifier integration test to JUnit5 and replace TestName with TestInfo.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestFeedbackAdaptiveRateLimiter.java Migrate adaptive rate limiter unit tests to JUnit5 lifecycle/tags and assertion message ordering.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestDefaultQuota.java Migrate default quota integration test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestDefaultOperationQuota.java Migrate default operation quota unit test to JUnit5 assertions/tags (incl. assertThrows).
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestDefaultAtomicQuota.java Migrate default atomic quota integration test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestClusterScopeQuotaThrottle.java Migrate cluster-scope throttling integration test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestBlockBytesScannedQuota.java Migrate block-bytes-scanned quota integration test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestAtomicReadQuota.java Migrate atomic read quota integration test to JUnit5 lifecycle/tags.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestActivePolicyEnforcement.java Migrate active policy enforcement unit test to JUnit5 lifecycle/tags and assertion message ordering.
hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/SpaceQuotaHelperForTests.java Refactor helper to accept a String test name and update assertion message ordering.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread hbase-server/src/test/java/org/apache/hadoop/hbase/quotas/TestSpaceQuotas.java Outdated
Signed-off-by: Duo Zhang <zhangduo@apache.org>
@liuxiaocs7 liuxiaocs7 force-pushed the HBASE-30039-branch-2 branch from 9dea567 to 67c636b Compare April 14, 2026 11:11
@liuxiaocs7 liuxiaocs7 merged commit b369b38 into apache:branch-2 Apr 16, 2026
30 of 35 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport This PR is a back port of some issue or issues already committed to master

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants