Tests use `start_writes` as a simple write workload to test that writes succeed when they should (e.g., there is no availability loss), but not to test performance. There is no reason to overload the CPU, which can lead to test failures. I suspect this function to be the cause of SCYLLADB-929, where the failures of `test_raft_recovery_user_data` (that creates multiple write workloads with `start_writes`) indicated that the machine was overloaded. The relevant observations: - two runs failed at the same time in debug mode, - there were many reactor stalls and RPC timeouts in the logs (leading to unexpected events like servers marking each other down and group0 leader changes). I didn't prove that `start_writes` really caused this, but adding this sleep should be a good change, even if I'm wrong. The number of writes performed by the test decreases 30-50 times with the sleep. Note that some other util functions like `start_writes_to_cdc_table` have such a sleep. This PR also contains some minor updates to `test_raft_recovery_user_data`. Fixes SCYLLADB-929 No backport: - the failures were observed only in master CI, - no proof that the change fixes the issue, so backports could be a waste of time. Closes scylladb/scylladb#28917 * github.com:scylladb/scylladb: test: test_raft_recovery_user_data: replace asyncio.gather with gather_safely test: test_raft_recovery_user_data: use the exclude_node API test: test_raft_recovery_user_data: drop tablet_load_stats_cfg test: cluster: util: sleep for 0.01s between writes in do_writes
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.