-
Notifications
You must be signed in to change notification settings - Fork 135
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
Test with AWS Keyspaces #865
Comments
Notes of my testing of Akka Persistence Cassandra with Keyspaces. Functional Differences: Amazon Keyspaces (for Apache Cassandra) versus Apache Cassandra: https://docs.aws.amazon.com/keyspaces/latest/devguide/functional-differences.html Supported consistency levels: https://docs.aws.amazon.com/keyspaces/latest/devguide/consistency.html SetupConsole: https://eu-central-1.console.aws.amazon.com/keyspaces/home?region=eu-central-1#service Create truststore according to: https://docs.aws.amazon.com/keyspaces/latest/devguide/using_java_driver.html#using_java_driver.BeforeYouBegin This truststore is used via the parameters: -Djavax.net.ssl.trustStore=path_to_file/cassandra_truststore.jks Create IAM user according to: https://docs.aws.amazon.com/keyspaces/latest/devguide/programmatic.credentials.html#programmatic.credentials.ssc There are instructions to create credentials for keyspaces, but I never needed those later. I used the Access key id for the IAM user as environment variables. These environment variables are not fully documented but the error message is pretty clear if they are not defined. Add the authentication plugin: https://docs.aws.amazon.com/keyspaces/latest/devguide/using_java_driver.html#java_tutorial.SigV4 ConfigConfigure the authentication plugin in application.conf (CassandraLifecycle.config):
Note that the contact points must also be configured, which isn’t fully documented. You find the endpoints for different regions at https://docs.aws.amazon.com/keyspaces/latest/devguide/programmatic.endpoints.html |
Test resultsIt was difficult to run tests because keyspace and table creation are asynchronous and not finished when the returned Future is completed. In the end I abandoned the automatic creation and created/dropped the tables with cql script via Successful tests:
Failing test (in order of importance):
Failing becuse truncate not supported
Performance related tests that I didn't try much (they probably fail due to throttling):
|
Since the database is too slow to store the initial data, the conditions to run the assertions are not met. I'm rewriting this test. |
The arguments to the prepared statement are in the wrong order. We're passing an Edit: I think passing the arguments in the wrong order is purposeful but is not leaving the database in the state the test needs. I'm investigating a bit more. It just happens that Keyspaces is more strict and doesn't allow setting an empty String on a column of type |
I've replaced table and keyspace truncation with |
Doesn't really need to use |
Rewritten without |
I couldn't reproduce these other failures. Changing the default SQL query as mentioned above ( |
The main problem running the test suite is still the time it takes to drop/create all tables every time. A way to make these tests run on Keyspaces faster would be to rewrite them with the following consideration:
Then, we could have a separate process in charge of dropping and creating all necessary Keyspaces. This tool/process would guarantee all required keyspaces exist and have all the necessary tables to run each test (note some tests don't even require the APC tables). The tool would be run before the test suite. A side effect of this improvement is that (maybe?) tests could even be run in parallel. |
We know some differences:
The text was updated successfully, but these errors were encountered: