Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Aug 7, 2025

This change makes the API consistency test methods in ApiConsistencyTestBase virtual, allowing database providers to override and customize the validation behavior for their specific needs.

Changes Made

Test Methods Made Virtual:

  • Fluent_api_methods_should_not_return_void
  • Generic_fluent_api_methods_should_return_generic_types
  • Builders_have_matching_methods
  • Metadata_types_have_expected_structure
  • Mutable_metadata_types_have_matching_methods
  • Convention_metadata_types_have_matching_methods
  • Convention_metadata_types_have_expected_methods
  • Convention_builder_types_have_expected_methods
  • Convention_builder_methods_have_matching_returns
  • Runtime_metadata_types_have_matching_methods
  • Readonly_metadata_methods_have_expected_name
  • Mutable_metadata_methods_have_expected_shape
  • Convention_metadata_methods_have_expected_shape

Helper Methods Made Protected Virtual:

  • ValidateConventionBuilderMethodReturns
  • ValidateMetadata
  • ValidateConventionMethods
  • ValidateConventionBuilderMethods
  • ValidateMutableMethod
  • ValidateConventionMethod
  • MatchMutable
  • MatchConvention
  • MatchRuntime

Benefits

Providers can now customize API consistency validation by overriding specific test methods or helper methods. For example, a provider might need to:

  • Skip certain validation rules that don't apply to their architecture
  • Add provider-specific validation logic
  • Modify validation criteria for provider-specific API patterns

Backward Compatibility

These changes are fully backward compatible. Existing provider tests will continue to work without modification, and providers can optionally override methods as needed.

Fixes #36521.


💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.

Copilot AI changed the title [WIP] Some tests in APIConsistencyTestBase are not virtual Make API consistency test methods virtual to allow provider customization Aug 7, 2025
Copilot AI requested a review from AndriySvyryd August 7, 2025 21:35
Copilot finished work on behalf of AndriySvyryd August 7, 2025 21:35
@AndriySvyryd AndriySvyryd marked this pull request as ready for review August 7, 2025 21:38
@AndriySvyryd AndriySvyryd requested a review from a team August 7, 2025 21:58
@AndriySvyryd AndriySvyryd merged commit a6fe25b into main Aug 8, 2025
7 checks passed
@AndriySvyryd AndriySvyryd deleted the copilot/fix-36521 branch August 8, 2025 16:18
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.

Some tests in APIConsistencyTestBase are not virtual

3 participants