Skip to content

testing: deduplicate integration stubs#473

Merged
wprzytula merged 1 commit into
scylladb:masterfrom
wprzytula:deduplicate-testing-stubs
Jun 8, 2026
Merged

testing: deduplicate integration stubs#473
wprzytula merged 1 commit into
scylladb:masterfrom
wprzytula:deduplicate-testing-stubs

Conversation

@wprzytula

Copy link
Copy Markdown
Contributor

This PR extracts one commit from #438 in order to merge it without further delay. It's authored by @dkropachev.
Original description:

The Rust integration layer already provides these test-only symbols when cpp_integration_testing is enabled. Drop the duplicate C++ stubs from testing_unimplemented.cpp so static integration builds link against a single definition.

Pre-review checklist

  • I have split my patch into logically separate commits.
  • All commit messages clearly explain what they change and why.
  • PR description sums up the changes and reasons why they should be introduced.
  • [ ] I have implemented Rust unit tests for the features/changes introduced.
  • [ ] I have enabled appropriate tests in Makefile in {SCYLLA,CASSANDRA}_(NO_VALGRIND_)TEST_FILTER.
  • [ ] I added appropriate Fixes: annotations to PR description.

The Rust integration layer already provides these test-only symbols when cpp_integration_testing is enabled. Drop the duplicate C++ stubs from testing_unimplemented.cpp so static integration builds link against a single definition.
@coderabbitai

coderabbitai Bot commented Jun 3, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This pull request removes 8 exported stub function implementations from src/testing_unimplemented.cpp. The removed functions—cass_aggregate_meta_name, cass_cluster_set_authenticator_callbacks, cass_function_meta_name, cass_keyspace_meta_aggregate_by_name, cass_keyspace_meta_function_by_name, cass_schema_meta_version, cass_statement_add_key_index, and cass_statement_set_keyspace—were all stub implementations that threw std::runtime_error("UNIMPLEMENTED ..."). The change streamlines the mock testing implementation to retain only actively-used stubs, reducing the exported symbol set by 8 functions while keeping the remaining stub functions intact.

Suggested labels

area/testing

Suggested reviewers

  • Lorak-mmk
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description is complete, explaining the purpose of the PR and referencing the original source. Appropriate checklist items are marked as completed; items marked with strikethrough are intentionally excluded as not applicable.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title 'testing: deduplicate integration stubs' directly describes the main change: removing duplicate stub implementations from the testing_unimplemented.cpp file, which is the core purpose of the PR.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Comment @coderabbitai help to get the list of available commands and usage tips.

@wprzytula wprzytula changed the title testing: remove duplicate static-integration stubs testing: remove duplicate integration stubs Jun 3, 2026
@wprzytula wprzytula changed the title testing: remove duplicate integration stubs testing: deduplicate integration stubs Jun 3, 2026
@coderabbitai coderabbitai Bot requested a review from Lorak-mmk June 3, 2026 15:23
@wprzytula wprzytula requested review from Lorak-mmk and Copilot and removed request for Lorak-mmk June 3, 2026 15:23
@wprzytula wprzytula self-assigned this Jun 3, 2026
@coderabbitai coderabbitai Bot added the area/testing Related to unit/integration testing label Jun 3, 2026
@wprzytula wprzytula added this to the 1.1.0 milestone Jun 3, 2026

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

This PR removes a handful of duplicate C API stub definitions from src/testing_unimplemented.cpp so that, when cpp_integration_testing is enabled, static integration-test builds don’t encounter multiple-definition linker errors and instead link against the Rust-provided test-only stub symbols.

Changes:

  • Deleted several UNIMPLEMENTED C++ stub exports that are already provided by the Rust integration-testing layer when cpp_integration_testing is enabled.

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

Comment on lines 25 to 29
CASS_EXPORT const CassValue*
cass_aggregate_meta_init_cond(const CassAggregateMeta* aggregate_meta) {
throw std::runtime_error("UNIMPLEMENTED cass_aggregate_meta_init_cond\n");
}
CASS_EXPORT void cass_aggregate_meta_name(const CassAggregateMeta* aggregate_meta,
const char** name, size_t* name_length) {
throw std::runtime_error("UNIMPLEMENTED cass_aggregate_meta_name\n");
}
CASS_EXPORT const CassDataType*
@wprzytula wprzytula merged commit 1253dd5 into scylladb:master Jun 8, 2026
16 checks passed
@wprzytula wprzytula deleted the deduplicate-testing-stubs branch June 8, 2026 08:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/testing Related to unit/integration testing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants