Apache Cassandra as stable candidate
Describe the proposal
It seems conformance tests have already been setup for cassandra. https://github.com/dapr/components-contrib/blob/master/tests/conformance/common.go#L429 Now we need to create certification tests for cassandra to graduate component to stable. Currently cassandra supports CRUD operations and TTL. https://docs.dapr.io/reference/components-reference/supported-state-stores/setup-cassandra/
Proposed tests
Test for TTL
- TTL not expiring
- TTL not a valid number
- TTL Expires as expected
- Provide a TTL of 1 second
- Fetch this record just after saving
- Sleep for 2 seconds
- Try to fetch again after a gap of 2 seconds, record shouldn't be deleted
Connection Recovery
- When Cassandra goes down and then comes back up the client is able to reconnect
Test Metadata Fields
-
Verify
portattribute is used- set port to non default value
- run dapr application with component
- component should successfully initialize
-
Verify
keyspaceattribute is used- set keyspace to non-default value
- run dapr application with component
- component should successfully initialize and create keyspace
-
Verify
tableattribute is used- set table to non-default value
- run dapr application with component
- component should successfully initialize and create table
- successfully run query on table
-
Verify
protoVersionattribute is used- set protoVersion to non-default value 0
- run dapr application with component
- cassandra client itself should detect version from cluster if protoVersion == 0
- component should successfully initialize
- run queries to verify
-
Verify
replicationFactorattribute is used- set replicationFactor to non-default value 2
- run dapr application with component using 2 nodes
- component should successfully initialize
- run queries to verify
-
Verify
consistencyattribute is used - negative test- set consistency to non-default value "Three"
- run dapr application with component
- component should successfully initialize
- run queries and see failure due to less than 3 nodes available
-
Verify
consistencyattribute is used- set consistency to non-default value "One"
- run dapr application with component
- component should successfully initialize
- run queries successfully
/assign
LGTM
The CRUD operation are covered by conformance tests and should not be part of certification tests.
You also need tests covering the metadata options:
- name: consistency
value: <REPLACE-WITH-CONSISTENCY> # Optional. default: "All"
- name: table
value: <REPLACE-WITH-TABLE> # Optional. default: "items"
- name: keyspace
value: <REPLACE-WITH-KEYSPACE> # Optional. default: "dapr"
- name: protoVersion
value: <REPLACE-WITH-PROTO-VERSION> # Optional. default: "4"
- name: replicationFactor
value: <REPLACE-WITH-REPLICATION-FACTOR> # Optional. default: "1"
Metadata tests have now been added
LGTM