Skip to content

HBASE-30190 Upgrade hbase-server to use junit5 Part21 - #8301

Merged
Apache9 merged 1 commit into
apache:masterfrom
Apache9:HBASE-30190
Jun 4, 2026
Merged

HBASE-30190 Upgrade hbase-server to use junit5 Part21#8301
Apache9 merged 1 commit into
apache:masterfrom
Apache9:HBASE-30190

Conversation

@Apache9

@Apache9 Apache9 commented Jun 2, 2026

Copy link
Copy Markdown
Contributor

No description provided.

@Apache9 Apache9 self-assigned this Jun 2, 2026
@Apache9
Apache9 requested a review from Copilot June 2, 2026 10:46

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Part 21 of the migration of hbase-server tests from JUnit 4 to JUnit 5. The PR converts replication-related tests under org.apache.hadoop.hbase.replication to use JUnit Jupiter APIs (@Tag, @BeforeAll/@AfterAll/@BeforeEach/@AfterEach, Assertions.*, @HBaseParameterizedTestTemplate, TableNameTestExtension), removes @ClassRule HBaseClassTestRule, and reshapes some base classes so that subclasses can override the @BeforeAll/@AfterAll lifecycle (e.g. TestReplicationBaseNoBeforeAll, SyncReplicationTestBaseNoBeforeAll). A couple of test files are also moved into the replication package, and assertion argument order is updated to JUnit 5 (expected, actual, message).

Changes:

  • Migrate replication tests/base classes from JUnit 4 to JUnit 5 (annotations, assertions, parameterization, table-name extension).
  • Split lifecycle: subclasses that need different @BeforeAll setup now extend *NoBeforeAll base classes and call configureClusters / startClusters directly.
  • Move TestBulkLoadReplication and TestBulkLoadReplicationHFileRefs into the replication package and replace TemporaryFolder with manually-created random dirs.

Reviewed changes

Copilot reviewed 67 out of 67 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
TestVerifyCellsReplicationEndpoint.java JUnit5 migration
TestSyncReplicationStandby*.java, TestSyncReplicationActive*.java, TestSyncReplicationRemoveRemoteWAL.java, TestSyncReplicationNewRSJoinBetweenRefreshes.java, TestSyncReplicationMoreLogs*.java JUnit5 migration, use startClusters()/NoBeforeAll bases
TestSyncReplicationActiveFSHLog.java Migration; still contains stale @Category
TestSerial*.java, TestBidirectionSerialReplicationStuck.java, TestAddToSerialReplicationPeer.java, TestRemoveFromSerialReplicationPeer.java, SerialReplicationTestBase.java JUnit5 migration; switch to TableNameTestExtension
TestReplicationWith*.java, TestReplicationStatus*.java, TestReplicationStuck*.java, TestReplicationOffsetUtil.java, TestReplicationMetricsforUI.java, TestReplicationKillSlaveRS.java, TestReplicationEmptyWALRecovery.java, TestReplicationEditsDropped*.java, TestReplicationDisableInactivePeer.java, TestReplicationChangingPeerRegionservers.java, TestReplicationProcedureRetry.java, TestReplicationBase*.java JUnit5 migration
TestReplicationSmallTests*.java Parameterized → @HBaseParameterizedTestTemplate; one assertion arg order regression
TestReplicationWALEntryFilters.java Migration; rename helper assertEqualsassertEntryEquals to avoid clashing with static import
TestRemovePeerProcedureWaitForSCP.java, TestClaimReplicationQueue.java Switched to TestReplicationBaseNoBeforeAll; lifecycle split into @BeforeEach/@AfterEach
TestPerTableCFReplication.java, TestNamespaceReplication*.java, TestMultiSlaveReplication.java, TestMigrateRepliationPeerStorageOnline.java, TestMasterReplication.java, TestHBaseReplicationEndpoint.java, TestNonHBaseReplicationEndpoint.java, TestEdits*.java JUnit5 migration
TestBulkLoadReplication.java, TestBulkLoadReplicationHFileRefs.java Moved to replication package; switched to TestReplicationBaseNoBeforeAll, removed TemporaryFolder
SyncReplicationTestBase*.java, SyncReplicationActiveTestBase.java, SyncReplicationStandbyTestBase.java, ReplicationDroppedTablesTestBase.java Base class refactors for JUnit5
VerifyReplicationTestBase.java Minor cleanup
TableNameTestExtension.java Add getTableName(String suffix) helper

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

@Apache9
Apache9 merged commit 8464d77 into apache:master Jun 4, 2026
12 of 13 checks passed
Apache9 added a commit that referenced this pull request Jun 4, 2026
Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
(cherry picked from commit 8464d77)
Apache9 added a commit that referenced this pull request Jun 5, 2026
(cherry picked from commit 8464d77)

Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
Apache9 added a commit that referenced this pull request Jun 6, 2026
…#8317)

(cherry picked from commit 8464d77)

Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
Apache9 added a commit that referenced this pull request Jun 6, 2026
…#8318)

(cherry picked from commit 8464d77)

Signed-off-by: Xiao Liu <liuxiaocs@apache.org>
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.

3 participants