HBASE-30146 Upgrade hbase-server to use junit5 Part18#8247
Open
liuxiaocs7 wants to merge 1 commit into
Open
Conversation
Member
liuxiaocs7
commented
May 17, 2026
- for branch-2.5
- see: HBASE-30146
There was a problem hiding this comment.
Pull request overview
Continues the migration of hbase-server tests from JUnit4 to JUnit5 (Part 18 of HBASE-30146, branch-2.5). Replaces JUnit4 idioms (@Category/@RunWith(Parameterized)/@ClassRule HBaseClassTestRule/@Rule TestName/Assert.*) with their JUnit5 equivalents (@Tag/@HBaseParameterizedTestTemplate/TestInfo/Assertions.*).
Changes:
- Switch ~30 region-server tests from JUnit4 annotations and runners to JUnit5 (
@Tag,@BeforeEach/@AfterEach,TestInfo,assertThrows). - Convert parameterized tests to use
HBaseParameterizedTestTemplatewithStream<Arguments> parameters(). - Drop
HBaseClassTestRule CLASS_RULEfields and migrate assertion imports/message-argument ordering to JUnit5 style.
Reviewed changes
Copilot reviewed 37 out of 37 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| TestWideScanner.java | Imports/annotations migrated to JUnit5. |
| TestWALMonotonicallyIncreasingSeqId.java | Parameterized → template; added wals close in tearDown. |
| TestWalAndCompactingMemStoreFlush.java | Assertion arg order/imports migrated. |
| TestTimestampFilterSeekHint.java | Migrated to JUnit5. |
| TestTagsReverseScan.java | Assertion import migration. |
| TestTags.java | Assertion import migration. |
| TestSyncTimeRangeTracker.java | JUnit5 migration; assertTrue→assertEquals. |
| TestSwitchToStreamRead.java | JUnit5 migration including @disabled. |
| TestStripeStoreFileManager.java | JUnit5 migration. |
| TestStripeStoreEngine.java | JUnit5 migration. |
| TestStoreScannerClosure.java | JUnit5 migration; message-arg reordering. |
| TestStoreScanner.java | JUnit5 migration; many assertEquals(true/false,…)→assertTrue/False. |
| TestStoreFileWriter.java | Parameterized → template. |
| TestStoreFileScannerWithTagCompression.java | JUnit5 migration (uses fully-qualified @tag). |
| TestStoreFileRefresherChore.java | JUnit5 migration; TestInfo for method name. |
| TestStoreFileInfo.java | Assertion migration. |
| TestSplitWithBlockingFiles.java | JUnit5 migration; removed unused LOG. |
| TestSplitWalDataLoss.java | JUnit5 migration. |
| TestSplitTransactionOnCluster.java | JUnit5 migration; TestInfo for method name. |
| TestSplitLogWorker.java | JUnit5 migration. |
| TestSimpleTimeRangeTracker.java | JUnit5 migration; classification changed Small→Medium. |
| TestShutdownWhileWALBroken.java | Parameterized → template. |
| TestSettingTimeoutOnBlockingPoint.java | JUnit5 migration. |
| TestServerNonceManager.java | Assertion migration. |
| TestSeekOptimizations.java | Parameterized → template. |
| TestSecureBulkLoadManager.java | Parameterized → template; assertThrows. |
| TestSecureBulkloadListener.java | JUnit5 migration; assertThrows. |
| TestSCVFWithMiniCluster.java | JUnit5 migration (comment placement awkward). |
| TestScanWithBloomError.java | Parameterized → template. |
| TestScannerWithCorruptHFile.java | JUnit5 migration; assertThrows. |
| TestScannerWithBulkload.java | JUnit5 migration; TestInfo for method name. |
| TestScannerTimeoutHandling.java | JUnit5 migration. |
| TestScannerRPCScanMetrics.java | JUnit5 migration. |
| TestScannerRetriableFailure.java | JUnit5 migration. |
| TestScannerHeartbeatMessages.java | JUnit5 migration. |
| TestScannerBlockSizeLimits.java | JUnit5 migration. |
| TestScanner.java | JUnit5 migration; TestInfo for method name. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+34
to
+35
| @Tag(RegionServerTests.TAG) | ||
| @Tag(MediumTests.TAG) |
Comment on lines
+50
to
+51
| @org.junit.jupiter.api.Tag(RegionServerTests.TAG) | ||
| @org.junit.jupiter.api.Tag(SmallTests.TAG) |
Comment on lines
52
to
58
| /* | ||
| * This test verifies that the scenarios illustrated by HBASE-10850 work w.r.t. essential column | ||
| * family optimization | ||
| */ | ||
| @Tag(RegionServerTests.TAG) | ||
| @Tag(MediumTests.TAG) | ||
| public class TestSCVFWithMiniCluster { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.