-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support to Cassandra Driver 4.x #121
Comments
Hi @mauriciogeneroso, Simulacron does work with driver 4.x. We even make extensive use of Simulacron in the driver 4.x integration tests suite itself. The Simulacron server does not depend on any driver, so you can perfectly use it with any compatible driver – all DataStax drivers are compatible. There should be no classpath issues even when running Simulacron embedded. Simulacron does offer, however, a tiny module called Maybe you could tell us exactly what's not working for you? Maybe it's when you upgraded from 3.x and 4.x that you noticed that some Simulacron tests broke? A concrete example would help us asses your problem. Thanks! |
Hi @adutra , Thank you for replying. I'll look into it to create some concrete examples and come back to you soon. Regards. |
Sorry for taking long to reply. Some ways how we were using simulacron with driver 3 broke when we just updated the cassandra driver to 4. For example, for String batchInserts = "BEGIN BATCH (omitted insert 1); (omitted insert 2); APPLY BATCH;"
BoundCluster simulacronCluster = getSimulacronCluster();
simulacronCluster.prime(when(batchInserts)
.then(writeTimeout(ConsistencyLevel.LOCAL_QUORUM, 0, 0, BATCH))
); Once updated the driver to List<Statement> statements = List.of(
new Statement("(omitted insert 1)", new HashMap<>(), new HashMap<>()),
new Statement("(omitted insert 2)", new HashMap<>(), new HashMap<>())
);
BoundCluster simulacronCluster = getSimulacronCluster();
simulacronCluster.prime(
when(new Batch(batchInserts),List.of(ConsistencyLevel.LOCAL_QUORUM))
.then(writeTimeout(ConsistencyLevel.LOCAL_QUORUM, 0, 0, BATCH))
); For single queries like There are more, but I'll mention only this difference for now, maybe we need a documentation how to use with driver 3 and how to use with driver 4 because the driver behaves different according the driver version used by the application to send the requests to cassandra. What are you thoughts? @adutra |
Is it planned to update this library to support Cassandra Java Driver 4?
The latest versions of spring-data-cassandra are using Cassandra Driver 4 that has received a big refactoring, and based on my experience, I worked in a project where we recently update our Cassandra from 3 to 4 and we found many issues with Simulacron.
Since it is officially supported only by Cassandra Java Driver 3, shall it receive an update to support the Cassandra Java Driver version 4?
Thank you.
The text was updated successfully, but these errors were encountered: