Skip to content

HBASE-30136 Upgrade hbase-server to use junit5 Part15#8291

Open
liuxiaocs7 wants to merge 1 commit into
apache:branch-2.6from
liuxiaocs7:HBASE-30136-branch-2.6
Open

HBASE-30136 Upgrade hbase-server to use junit5 Part15#8291
liuxiaocs7 wants to merge 1 commit into
apache:branch-2.6from
liuxiaocs7:HBASE-30136-branch-2.6

Conversation

@liuxiaocs7
Copy link
Copy Markdown
Member

@liuxiaocs7 liuxiaocs7 requested a review from Copilot May 30, 2026 17:43
@liuxiaocs7 liuxiaocs7 added the backport This PR is a back port of some issue or issues already committed to master label May 30, 2026
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 is part 15 of the JUnit 4 → JUnit 5 migration for hbase-server tests on branch-2.6 (HBASE-30136). It mechanically rewrites a large batch of region-server tests to use Jupiter API equivalents.

Changes:

  • Replace JUnit 4 imports/annotations (@Category, @ClassRule/HBaseClassTestRule, @Rule/TestName, @Before/@After, @Test(expected=…), Assert.*, Assume.*, @Ignore, @RunWith(Parameterized.class)) with JUnit 5 equivalents (@Tag(<category>.TAG), @BeforeEach/@AfterEach/@BeforeAll/@AfterAll, assertThrows, Assertions.*, Assumptions.*, @Disabled, @HBaseParameterizedTestTemplate/@ParameterizedClass).
  • Swap TestName rule for a name captured from TestInfo in @BeforeEach; flip JUnit-4 assert-message-first signatures to Jupiter's message-last form.
  • Restructure TestDefaultMemStore/TestCompactingMemStore/TestCompactingToCellFlatMapMemStore lifecycle into internalSetUp/createChunkCreator/createMemStore/internalTearDown hooks; convert TestBulkloadBase TemporaryFolder to a @TempDir File; in TestCleanupMetaWAL change tearDown from shutdownMiniZKCluster() to shutdownMiniCluster(); reclassify TestCompactingToCellFlatMapMemStore from LargeTests to MediumTests.

Reviewed changes

Copilot reviewed 56 out of 56 changed files in this pull request and generated no comments.

Show a summary per file
File Description
TestGetClosestAtOrBefore.java JUnit5 migration; TestName → TestInfo
TestFSErrorsExposed.java JUnit5 migration; Assume → Assumptions
TestFlushRegionEntry.java JUnit5 migration; class/instance hooks
TestFlushLifeCycleTracker.java JUnit5 migration
TestFailedAppendAndSync.java JUnit5 migration; message arg reorder
TestEndToEndSplitTransaction.java JUnit5 migration; assert message reorder
TestEncryptionRandomKeying.java JUnit5 migration
TestEncryptionKeyRotation.java JUnit5 migration
TestEncryptionDisabled.java ExpectedException → assertThrows
TestDirectStoreSplitsMerges.java JUnit5 migration
TestDeleteMobTable.java JUnit5 migration; Assert.* → static asserts
TestDefaultStoreEngine.java JUnit5 migration
TestDefaultMemStore.java New lifecycle hooks for parameterized subclasses
TestDefaultCompactSelection.java JUnit5 migration
TestDateTieredCompactionPolicyOverflow.java JUnit5 migration
TestDateTieredCompactionPolicyHeterogeneousStorage.java JUnit5 migration
TestDateTieredCompactionPolicy.java JUnit5 migration
TestDataTieringManager.java JUnit5 migration
TestDataBlockEncodingTool.java JUnit5 migration
TestCustomCellTieredCompactionPolicy.java JUnit5 migration
TestCustomCellDataTieringManager.java JUnit5 migration; Javadoc tweak
TestCompoundBloomFilter.java JUnit5 migration
TestCompactSplitThread.java try/fail → assertDoesNotThrow
TestCompactorMemLeak.java JUnit5 migration
TestCompactionWithShippingCoprocessor.java JUnit5 migration
TestCompactionWithCoprocessor.java JUnit5 migration
TestCompactionWithByteBuff.java JUnit5 migration
TestCompactionState.java JUnit5 migration
TestCompactionPolicy.java JUnit5 migration
TestCompactionLifeCycleTracker.java JUnit5 migration; @Ignore@Disabled
TestCompactionInDeadRegionServer.java Parameterized → HBaseParameterizedTestTemplate
TestCompactionFileNotFound.java JUnit5 migration; remove dead try/catch
TestCompactionArchiveIOException.java JUnit5 migration
TestCompactionArchiveConcurrentClose.java JUnit5 migration
TestCompactionAfterBulkLoad.java Parameterized template; switch testFolder usage
TestCompaction.java JUnit5 migration; Assume.assumeNoException → Assumptions.abort
TestCompactingToCellFlatMapMemStore.java ParameterizedClass; category Large → Medium
TestCompactingMemStore.java Restructure lifecycle to override hooks
TestColumnSeeking.java JUnit5 migration
TestClusterId.java JUnit5 migration
TestClearRegionBlockCache.java Parameterized → HBaseParameterizedTestTemplate
TestCleanupMetaWAL.java JUnit5 migration; tearDown now shutdownMiniCluster
TestCleanupCompactedFileOnRegionClose.java JUnit5 migration
TestCleanupCompactedFileAfterFailover.java JUnit5 migration
TestCellSkipListSet.java JUnit5 migration
TestCellFlatSet.java Parameterized template; assert reorder
TestCacheOnWriteInSchema.java Parameterized template; cleanup
TestBytesReadServerSideScanMetrics.java JUnit5 migration; Assert.* → static asserts
TestBulkloadBase.java TemporaryFolder → @tempdir; parameters() helper
TestBulkLoad.java @test(expected=…) → assertThrows
TestBrokenStoreFileCleaner.java JUnit5 migration
TestBootstrapNodeManager.java JUnit5 migration
TestBloomFilterFaulty.java JUnit5 migration
TestBlocksScanned.java JUnit5 migration
TestBlocksRead.java JUnit5 migration; message reorder
TestAtomicOperation.java JUnit5 migration; javadoc reference update

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

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