The Alternator test test_ttl.py::test_ttl_expiration_lsi_key is currently the second-slowest test/alternator test, run a "whopping" 2.6 seconds (the total of two parameterizations - with vnodes and tables). This patch reduces it to 0.9 seconds. The fix is simple: Unfortunately, tests that need to wait for actual TTL expiration take time, but the test framework configures the TTL scanner to have a period of half a second, so the wait should be on average around 0.25 seconds. But the test code by mistake slept 1.2 seconds between retries. We even had a good "sleep" variable for the amount of time we should sleep between retries, but forgot to use it. So after lowering the sleep between retries, this test is still not instantenous - it still needs to wait up to 0.5 seconds for the expirations to occur - but it's almost 3 times faster than before. While working on this test, I also used the opportunity to update its comment which excused why we are testing LSI and not GSI. Its suggestions of what is planned for GSI have already become a reality, so let's update the comment to say so. Signed-off-by: Nadav Har'El <nyh@scylladb.com> Closes scylladb/scylladb#25386
Scylla in-source tests.
For details on how to run the tests, see docs/dev/testing.md
Shared C++ utils, libraries are in lib/, for Python - pylib/
alternator - Python tests which connect to a single server and use the DynamoDB API unit, boost, raft - unit tests in C++ cqlpy - Python tests which connect to a single server and use CQL topology* - tests that set up clusters and add/remove nodes cql - approval tests that use CQL and pre-recorded output rest_api - tests for Scylla REST API Port 9000 scylla-gdb - tests for scylla-gdb.py helper script nodetool - tests for C++ implementation of nodetool
If you can use an existing folder, consider adding your test to it. New folders should be used for new large categories/subsystems, or when the test environment is significantly different from some existing suite, e.g. you plan to start scylladb with different configuration, and you intend to add many tests and would like them to reuse an existing Scylla cluster (clusters can be reused for tests within the same folder).
To add a new folder, create a new directory, and then
copy & edit its suite.ini.