Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: enable NullStringApiArgsTest suite #194

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

muzarski
Copy link
Collaborator

Makes cass_session_prepare logic consistent with cpp-driver (even though, I am not a fan of it) and enables NullStringApiArgsTest test suite.

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 .github/workflows/build.yml in gtest_filter.
  • I have enabled appropriate tests in .github/workflows/cassandra.yml in gtest_filter.

@muzarski
Copy link
Collaborator Author

muzarski commented Oct 16, 2024

As a small optimization, to safe a round-trip for a request that we know will fail anyway, we could return an early "server error" (syntax error) without sending the acutal request.

@muzarski muzarski force-pushed the null-api-strings-it branch from 5e262de to 0d71715 Compare October 16, 2024 14:28
@muzarski muzarski self-assigned this Oct 16, 2024
I explained the reasoning in the code:

// Apparently nullptr denotes an empty statement string.
// It seems to be intended (for some weird reason, why not save a round-trip???)
// to receive a server error in such case (CASS_ERROR_SERVER_SYNTAX_ERROR).
// There is a test for this: `NullStringApiArgsTest.Integration_Cassandra_PrepareNullQuery`.
@muzarski muzarski force-pushed the null-api-strings-it branch from 0d71715 to ff12066 Compare October 16, 2024 14:53
@muzarski muzarski requested a review from Lorak-mmk October 16, 2024 14:53
Copy link
Collaborator

@wprzytula wprzytula left a comment

Choose a reason for hiding this comment

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

Weird indeed. This is one of moments when I wonder if we should follow cpp-driver, or rather be wiser.

@Lorak-mmk
Copy link
Collaborator

Weird indeed. This is one of moments when I wonder if we should follow cpp-driver, or rather be wiser.

I think we could have different (better) behavior if we are sure that it will not break apps that try to migrate to our driver.

@muzarski muzarski merged commit 5f8e82a into scylladb:master Oct 16, 2024
11 checks passed
@muzarski muzarski mentioned this pull request Nov 27, 2024
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