Skip to content

HBASE-30082 Upgrade hbase-server to use junit5 Part12#8190

Draft
Apache9 wants to merge 2 commits intoapache:masterfrom
Apache9:HBASE-30082
Draft

HBASE-30082 Upgrade hbase-server to use junit5 Part12#8190
Apache9 wants to merge 2 commits intoapache:masterfrom
Apache9:HBASE-30082

Conversation

@Apache9
Copy link
Copy Markdown
Contributor

@Apache9 Apache9 commented May 4, 2026

No description provided.

@Apache9 Apache9 self-assigned this May 4, 2026
@Apache9 Apache9 requested a review from Copilot May 4, 2026 14: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 test-suite migration from JUnit4 to JUnit5 in hbase-server client-side tests and shared test bases. Most edits are mechanical framework updates, but a few migration blockers remain in the converted test wiring.

Changes:

  • Replaces JUnit4 assertions, categories, and lifecycle annotations with Jupiter equivalents across a large set of client, replication, and locking tests.
  • Converts several parameterized/name-dependent tests to JUnit5 patterns such as HBaseParameterizedTestTemplate, constructor injection, TestInfo, and TableNameTestExtension.
  • Updates shared abstract test bases so many subclasses inherit Jupiter-compatible lifecycle behavior.

Reviewed changes

Copilot reviewed 160 out of 160 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
TestZKConnectionRegistry.java Jupiter assertions and lifecycle updates for ZK registry tests.
TestUpdateConfiguration.java Replaces TestName with TestInfo and updates lifecycle annotations.
TestTableSnapshotScannerWithSFT.java Cleans up class-level test metadata for the SFT snapshot scanner subclass.
TestSnapshotWithTTLFromClient.java Migrates assertions and cluster/table setup/teardown hooks to Jupiter.
TestSnapshotWithAclAsyncAdmin.java Converts class metadata for async ACL snapshot test subclass.
TestSnapshotWithAcl.java Converts class metadata for sync ACL snapshot test subclass.
TestSnapshotTemporaryDirectoryWithRegionReplicas.java Migrates subclass to HBaseParameterizedTestTemplate.
TestSnapshotMetadata.java Updates assertions and lifecycle hooks for snapshot metadata tests.
TestSnapshotFromClientWithRegionReplicas.java Adapts region-replica snapshot subclass to constructor-based parameterization.
TestSnapshotDFSTemporaryDirectory.java Migrates DFS temp-dir snapshot test to Jupiter parameterized template style.
TestSizeFailures.java Updates lifecycle/category/assertion usage for large scan-size failure tests.
TestShutdownOfMetaReplicaHolder.java Converts meta-replica shutdown test metadata and setup to Jupiter.
TestServerLoadDurability.java Reworks parameterized RPC-server coverage onto HBaseParameterizedTestTemplate.
TestServerBusyException.java Replaces TestName with TestInfo and migrates lifecycle/assertions.
TestSeparateClientZKCluster.java Migrates class lifecycle/tags for separate client-ZK cluster tests.
TestScanWithoutFetchingData.java Updates scanner-behavior test assertions and lifecycle annotations.
TestScannerTimeout.java Converts scanner-timeout test setup/teardown to Jupiter.
TestScanAttributes.java Moves small attribute-only unit test to Jupiter assertions/tags.
TestRpcConnectionRegistry.java Migrates RPC registry tests to Jupiter lifecycle/assertion style.
TestResultSizeEstimation.java Replaces TestName with TestInfo and updates assertions/lifecycle.
TestResultScannerCursor.java Updates subclass metadata for result-scanner cursor tests.
TestResultFromCoprocessor.java Migrates coprocessor result test lifecycle and assertions.
TestResult.java Replaces JUnit4 assertions/categories with Jupiter equivalents.
TestRequestTooBigException.java Migrates request-size exception test setup/teardown and assertions.
TestRequestAttributes.java Converts request-attribute test metadata and lifecycle annotations.
TestRegionLocator.java Updates region-locator subclass setup/teardown annotations.
TestRegionLocationCaching.java Migrates assertions and lifecycle for location-cache behavior tests.
TestRawAsyncTablePartialScan.java Converts async partial-scan test lifecycle/assertions to Jupiter.
TestRawAsyncTableLimitedScanWithFilter.java Updates limited async scan test assertions and lifecycle hooks.
TestRawAsyncScanCursor.java Migrates async scan-cursor subclass setup and metadata.
TestPutDeleteEtcCellIteration.java Replaces expected-exception syntax with Jupiter assertThrows.
TestPreadReversedScanner.java Migrates reversed pread scanner assertions and lifecycle hooks.
TestMvccConsistentScanner.java Replaces TestName with TestInfo and updates lifecycle/assertions.
TestMutationGetCellBuilder.java Migrates method-name handling and assertions for mutation cell-builder tests.
TestMultiRespectsLimits.java Replaces TestName with TestInfo and updates lifecycle/tags.
TestMultiActionMetricsFromClient.java Converts metrics-from-client test to Jupiter lifecycle/assertions.
TestMobSnapshotFromClient.java Adapts MOB snapshot subclass to constructor-based parameterization style.
TestMobSnapshotCloneIndependence.java Migrates MOB clone-independence subclass lifecycle metadata.
TestMetaWithReplicasShutdownHandling.java Converts meta-replica shutdown-handling subclass metadata.
TestMetaWithReplicasBasic.java Updates meta-replica basic test metadata/assertions/setup.
TestMetaTableAccessorNoCluster.java Migrates no-cluster meta-accessor lifecycle and assertions.
TestMetaReplicasAddressChange.java Converts meta-replica address-change test metadata and setup.
TestMetaRegionLocationCache.java Migrates meta-region cache test lifecycle and assertions.
TestMetaCache.java Updates meta-cache test lifecycle, assertions, and executable callback type.
TestMasterRegistry.java Converts master-registry tests to Jupiter lifecycle/assertion style.
TestMalformedCellFromClient.java Migrates malformed-cell tests to Jupiter lifecycle/assertions.
TestLimitedScanWithFilter.java Updates limited-scan test lifecycle/assertions.
TestIntraRowPagination.java Converts small intra-row pagination test metadata.
TestIncrementFromClientSideWithCoprocessor.java Updates coprocessor increment subclass setup annotation.
TestIncreaseMetaReplicaThroughConfig.java Migrates meta-replica config increase test setup/tags.
TestIllegalTableDescriptor.java Replaces TestName with TestInfo and updates lifecycle/assertions.
TestGetScanPartialResult.java Converts partial-result scan test setup/teardown/assertions.
TestGetScanColumnsWithNewVersionBehavior.java Migrates column-version scan test lifecycle/assertions.
TestGetProcedureResult.java Updates procedure-result test lifecycle/tags/assertions.
TestFlushFromClientWithDisabledFlushProcedure.java Replaces TestName with TestInfo and migrates flush test lifecycle.
TestFlushFromClient.java Replaces TestName with TestInfo and updates async flush test lifecycle.
TestFallbackToUseReplay.java Migrates replay-fallback test lifecycle and assertions.
TestFailedMetaReplicaAssigment.java Converts failed meta-replica assignment test lifecycle/tags.
TestEnableTable.java Replaces TestName with TestInfo and updates lifecycle/tags.
TestDropTimeoutRequest.java Replaces TestName with TestInfo and migrates lifecycle/tags.
TestConnectionUtils.java Converts small connection utility test metadata/assertions.
TestConnectionAttributes.java Migrates connection-attribute test lifecycle/tags.
TestCompleteResultScanResultCache.java Updates small result-cache unit test setup/teardown to Jupiter.
TestClientTimeouts.java Converts client-timeout test lifecycle/assertions.
TestClientTableMetrics.java Migrates client-table metrics test lifecycle/assertions.
TestClientOperationInterrupt.java Updates interrupt-handling test lifecycle and assertions.
TestCleanupMetaReplicaThroughConfig.java Converts meta-replica cleanup-by-config test setup/tags.
TestCleanupMetaReplica.java Converts meta-replica cleanup test setup/tags.
TestCISleep.java Switches CI timeout subclass to TableNameTestExtension.
TestCIPutRpcTimeout.java Updates CI RPC-timeout put subclass metadata.
TestCIPutOperationTimeout.java Updates CI operation-timeout put subclass metadata.
TestCIIncrementRpcTimeout.java Updates CI RPC-timeout increment subclass metadata.
TestCIGetRpcTimeout.java Updates CI RPC-timeout get subclass metadata.
TestCIGetOperationTimeout.java Updates CI operation-timeout get subclass metadata.
TestCIDeleteRpcTimeout.java Updates CI RPC-timeout delete subclass metadata.
TestCIDeleteOperationTimeout.java Updates CI operation-timeout delete subclass metadata.
TestCheckAndMutateWithByteBuff.java Replaces TestName with TestInfo and updates lifecycle/assertions.
TestCatalogReplicaLoadBalanceSimpleSelector.java Migrates catalog-replica selector test lifecycle/assertions.
TestBufferedMutator.java Converts buffered-mutator test setup/teardown to Jupiter.
TestBootstrapNodeUpdate.java Migrates bootstrap-node update test lifecycle/assertions.
TestBatchScanResultCache.java Updates batch scan-result cache unit test lifecycle.
TestAsyncTableUseMetaReplicas.java Replaces expected-exception syntax and updates lifecycle/tags.
TestAsyncTableScanRenewLease.java Migrates async lease-renew scan test lifecycle/assertions.
TestAsyncTableScannerCloseWhileSuspending.java Converts async scanner-close test lifecycle/tags.
TestAsyncTableScanMetricsWithScannerSuspending.java Updates async scan-metrics test lifecycle/assertions.
TestAsyncTableScanException.java Replaces expected-exception syntax and migrates lifecycle/tags.
TestAsyncTableRSCrashPublish.java Converts RS-crash publish test lifecycle/assertions.
TestAsyncTableRegionReplicasScan.java Migrates scan replica test to constructor-based parameterized template.
TestAsyncTableRegionReplicasGet.java Migrates get replica test to constructor-based parameterized template.
TestAsyncTableRegionLocator.java Updates async region-locator subclass lifecycle.
TestAsyncTableNoncedRetry.java Replaces TestName with TestInfo and updates lifecycle/tags.
TestAsyncTableLocateRegionForDeletedTable.java Migrates deleted-table locator test lifecycle/assertions.
TestAsyncTableLocatePrefetch.java Converts locate-prefetch async test lifecycle/assertions.
TestAsyncTableGetMultiThreadedWithEagerCompaction.java Replaces JUnit4 ignore/lifecycle annotations in eager-compaction subclass.
TestAsyncTableGetMultiThreadedWithBasicCompaction.java Replaces JUnit4 ignore/lifecycle annotations in basic-compaction subclass.
TestAsyncTableGetMultiThreaded.java Migrates async multithreaded-get test lifecycle/assertions.
TestAsyncTableBatchRetryImmediately.java Converts async batch retry test lifecycle/assertions.
TestAsyncSingleRequestRpcRetryingCaller.java Migrates async single-request retry test lifecycle/assertions.
TestAsyncResultScannerCursor.java Updates async result-scanner cursor subclass setup metadata.
TestAsyncRegionLocator.java Converts async region-locator test lifecycle/assertions.
TestAsyncNonMetaRegionLocatorConcurrenyLimit.java Migrates locator concurrency-limit test lifecycle/assertions.
TestAsyncClientPushback.java Converts async client pushback subclass lifecycle annotations.
TestAsyncClientPauseForServerOverloaded.java Migrates overloaded-server pause test lifecycle/tags.
TestAsyncClientPauseForRpcThrottling.java Migrates RPC-throttling pause test lifecycle/assertions.
TestAsyncBufferMutator.java Converts async buffered-mutator test lifecycle/assertions.
TestAppendFromClientSide.java Replaces TestName with TestInfo and updates lifecycle/assertions.
TestAlwaysSetScannerId.java Migrates scanner-id test lifecycle/assertions.
TestAllowPartialScanResultCache.java Updates allow-partial result-cache unit test lifecycle.
TestAdminBase.java Replaces TestName with TestInfo in shared admin test base.
TestAdmin4.java Migrates admin test assertions/tags to match Jupiter base updates.
SnapshotWithAclTestBase.java Replaces TableNameTestRule with TableNameTestExtension and migrates lifecycle/assertions.
replication/TestReplicationAdminForSyncReplication.java Converts sync-replication admin test lifecycle/assertions.
replication/TestBadReplicationPeer.java Replaces TestName with TestInfo and updates lifecycle/tags.
RegionReplicaTestHelper.java Updates helper assertions to Jupiter APIs.
MetaWithReplicasTestBase.java Replaces TableNameTestRule with TableNameTestExtension and updates teardown annotation.
locking/TestEntityLocks.java Migrates entity-lock unit test setup/assertions/tags.
BasicReadWriteWithDifferentConnectionRegistriesTestBase.java Updates shared base assertions to Jupiter.
AbstractTestScanCursor.java Converts shared scan-cursor cluster lifecycle to Jupiter.
AbstractTestResultScannerCursor.java Updates abstract scanner-cursor test methods to Jupiter APIs.
AbstractTestRegionLocator.java Migrates shared region-locator teardown/test annotations.
AbstractTestCITimeout.java Replaces TestName with TableNameTestExtension in CI timeout base.
AbstractTestCIRpcTimeout.java Switches CI RPC-timeout base to Jupiter lifecycle and table-name extension.
AbstractTestCIOperationTimeout.java Switches CI operation-timeout base to Jupiter lifecycle and table-name extension.
AbstractTestAsyncTableRegionReplicasRead.java Reworks shared async replica-read base onto HBaseParameterizedTestTemplate.

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

Copy link
Copy Markdown
Contributor Author

@Apache9 Apache9 left a comment

Choose a reason for hiding this comment

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

The PR is done by OpenCode with MiMo V2.5 Pro, so for most things they can do them right but there are still lots of small problems...

Let me polishing before merging...

@Apache9 Apache9 marked this pull request as draft May 4, 2026 15:07
@Apache9
Copy link
Copy Markdown
Contributor Author

Apache9 commented May 5, 2026

Seems the docker image build is not very stable...

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.

2 participants