components-contrib
components-contrib copied to clipboard
Add certification tests for MemCached State Store component
- The MemCached State Store component requires certification tests to be created.
- Add conformance tests if not present.
/assign
I am proposing the following test plan for Memcached:
Memcached State Store certification testing
This project aims to test the Memcached State Store component under various conditions.
This state store supports the following features:
- CRUD
- TTL
Test plan
Basic Test for CRUD operations:
- Able to create and test connection.
- Able to do set, fetch, update and delete.
- Negative test to fetch record with key, that is not present.
Test save or update data with different TTL settings:
- TTL not expiring (
0
for memcached) - TTL not a valid number
- 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 found
Out of scope
- Tests verifying content persistence on Memcached reloads are out of scope as Memcached data is ephemeral.
- Tests for features not implemented by Memcached are out of scope. This includes
- Transactional
- ETag.
- Notice that memcached has the concept of 64-bit CheckAndSet (CAS) values but that doesn't translate cleanly to ETags.
- Actors
- Query
Updated test plan, adding "Test network instability section"
Memcached State Store certification testing
This project aims to test the Memcached State Store component under various conditions.
This state store supports the following features:
- CRUD
- TTL
Test plan
Basic Test for CRUD operations:
- Able to create and test connection.
- Able to do set, fetch, update and delete.
- Negative test to fetch record with key, that is not present.
Test save or update data with different TTL settings:
- TTL not expiring (
0
for memcached) - TTL not a valid number
- 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 found
Test network instability
- Configure memcache with a known (non-default) timeout of 20 seconds.
- Set a key to show the connection is fine. Make the TTL is way bigger than the timeout. Say 4x its value.
- Interrupt the network (the memcache ports) for longer than the established timeout value.
- Wait a few seconds seconds (less than the timeout value).
- Try to read the key written on step 2 and assert its.
Out of scope
- Tests verifying content persistence on Memcached reloads are out of scope as Memcached data is ephemeral.
- Tests for features not implemented by Memcached are out of scope. This includes
- Transactional
- ETag
- Notice that memcached has the concept of 64-bit CheckAndSet (CAS) values but that doesn't translate cleanly to ETags.
- Actors
- Query