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

Add a test for wrong/missing named bind markers in prepared statement #759

Closed
yarongilor opened this issue Jul 13, 2023 · 3 comments
Closed
Assignees

Comments

@yarongilor
Copy link

This request is actually about testing scylla itself and not RUST driver.
It is related to the scylla issue of: scylladb/scylladb#12727
Since the fix of this issue cannot be tested via python-driver and unit-test, one (possibly not-too-complicated) alternative is using a RUST driver unit test.

see more details and an example reproducer in the above scylla issue.

@piodul
Copy link
Collaborator

piodul commented Jul 13, 2023

I'd rather not put a test which verifies behavior of Scylla here. This is far from a perfect solution:

  • We might improve driver-side validation in the future and it might become impossible to have a mismatch like this (ref: Consider improvements for passing values to queries #463). We would have to get rid of the test after this is implemented.
  • This test should run when changes are committed to Scylla repo, not when changes are committed here. We only test with the latest released version.

Apparently, we need a framework/tools that allows to craft incorrect requests and verify that Scylla rejects them properly. Perhaps we could factor out some lower-level parts of the Python driver to allow that? cc: @Lorak-mmk

@Lorak-mmk Lorak-mmk self-assigned this Nov 15, 2023
@Lorak-mmk
Copy link
Collaborator

Lorak-mmk commented Jan 3, 2024

Now the aforementioned validations were implemented, so it's no longer possible to craft such requests using rust driver.

However, driver is split into few crates, and scylla-cql crate is imho a very good tool for such test. Using only scylla-cql and tokio it takes a small amount of code to create something resembling a session and sens such requests. Maybe it could be used in Scylla tests @yarongilor ?

@edit Technically it could be crafted using Rust driver, using some wrappers that remove type-safety, but the argument about testing Scylla in this repo still stands. Scylla tests should be in the Scylla repo.

@Lorak-mmk
Copy link
Collaborator

Closing this for reasons stated by me and @piodul

@Lorak-mmk Lorak-mmk closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 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

No branches or pull requests

3 participants