Skip to content

Conversation

@brfrn169
Copy link
Collaborator

@brfrn169 brfrn169 commented Jun 4, 2025

Description

This PR merges ConsensusCommitTestUtils and ConsensusCommitIntegrationTestUtils, as their roles are similar.

Related issues and/or PRs

N/A

Changes made

  • Merged ConsensusCommitTestUtils and ConsensusCommitIntegrationTestUtils

Checklist

The following is a best-effort checklist. If any items in this checklist are not applicable to this PR or are dependent on other, unmerged PRs, please still mark the checkboxes after you have read and understood each item.

  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation to reflect the changes.
  • I have considered whether similar issues could occur in other products, components, or modules if this PR is for bug fixes.
  • Any remaining open issues linked to this PR are documented and up-to-date (Jira, GitHub, etc.).
  • Tests (unit, integration, etc.) have been added for the changes.
  • My changes generate no new warnings.
  • Any dependent changes in other PRs have been merged and published.

Additional notes (optional)

N/A

Release notes

N/A

@brfrn169 brfrn169 requested a review from Copilot June 4, 2025 06:15
@brfrn169 brfrn169 self-assigned this Jun 4, 2025
Copy link
Contributor

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 consolidates two similar utility classes by merging ConsensusCommitIntegrationTestUtils into ConsensusCommitTestUtils and updating all references accordingly.

  • Unified suffix addition functionality across integration tests by replacing all calls to ConsensusCommitIntegrationTestUtils with ConsensusCommitTestUtils.
  • Removed the obsolete ConsensusCommitIntegrationTestUtils file.

Reviewed Changes

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

Show a summary per file
File Description
integration-test/.../TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestBase.java Updated suffix addition call to use ConsensusCommitTestUtils
integration-test/.../TwoPhaseConsensusCommitSpecificIntegrationTestBase.java Updated both properties1 and properties2 suffix addition calls
integration-test/.../TwoPhaseConsensusCommitIntegrationTestBase.java Replaced suffix addition calls in both getProperties1 and getProperties2
integration-test/.../TwoPhaseConsensusCommitCrossPartitionScanIntegrationTestBase.java Updated calls to add suffix to coordinator namespace
integration-test/.../ConsensusCommitWithIncludeMetadataEnabledIntegrationTestBase.java Replaced suffix addition call in beforeAll()
integration-test/.../ConsensusCommitTestUtils.java Introduced new merged utility method and preserved existing functionality
integration-test/.../ConsensusCommitSpecificIntegrationTestBase.java Updated suffix addition call in beforeAll()
integration-test/.../ConsensusCommitNullMetadataIntegrationTestBase.java Replaced suffix addition call in beforeAll()
integration-test/.../ConsensusCommitIntegrationTestBase.java Updated suffix addition call in getProperties()
integration-test/.../ConsensusCommitCrossPartitionScanIntegrationTestBase.java Updated suffix addition call in getProperties()
integration-test/.../ConsensusCommitAdminRepairIntegrationTestBase.java Updated suffix addition call in getProperties()
integration-test/.../ConsensusCommitAdminIntegrationTestBase.java Updated suffix addition call in getProperties()
integration-test/.../ConsensusCommitAdminImportTableIntegrationTestBase.java Updated suffix addition call in getProperties()
core/.../MultiStorageSchemaLoaderIntegrationTest.java Replaced suffix addition for both Cassandra and JDBC properties
core/.../ConsensusCommitJdbcEnv.java Updated suffix addition call in getProperties()
core/.../ConsensusCommitDynamoEnv.java Updated suffix addition call in getProperties()
core/.../ConsensusCommitCosmosEnv.java Updated suffix addition call in getProperties()
core/.../ConsensusCommitCassandraEnv.java Updated suffix addition call in getProperties()
Comments suppressed due to low confidence (2)

integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/TwoPhaseConsensusCommitWithIncludeMetadataEnabledIntegrationTestBase.java:63

  • Consider updating the related documentation or in-code comments to reference the merge of ConsensusCommitIntegrationTestUtils into ConsensusCommitTestUtils for clarity.
ConsensusCommitTestUtils.addSuffixToCoordinatorNamespace(properties, TEST_NAME);

integration-test/src/main/java/com/scalar/db/transaction/consensuscommit/ConsensusCommitIntegrationTestUtils.java:1

  • Ensure that no external modules or tests rely on ConsensusCommitIntegrationTestUtils now that it has been removed from the codebase.
package com.scalar.db.transaction.consensuscommit; // file removal

return properties;
}

public static void addSuffixToCoordinatorNamespace(Properties properties, String suffix) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moved this method from ConsensusCommitIntegrationTestUtils to ConsensusCommitTestUtils.

Copy link
Contributor

@feeblefakie feeblefakie left a comment

Choose a reason for hiding this comment

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

LGTM! Thank you!

Copy link
Contributor

@komamitsu komamitsu left a comment

Choose a reason for hiding this comment

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

LGTM! 👍

@brfrn169 brfrn169 merged commit e7c8b7a into master Jun 4, 2025
55 checks passed
@brfrn169 brfrn169 deleted the merge-ConsensusCommitTestUtils-and-ConsensusCommitIntegrationTestUtils branch June 4, 2025 14:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants