The usual Scylla shutdown in a cluster test takes ~2.1s. 2s come from ``` co_await sleep(std::chrono::milliseconds(_gcfg.shutdown_announce_ms)); ``` as the default value of `shutdown_announce_in_ms` is 2000. This sleep makes every `server_stop_gracefully` call 2s slower. There are ~300 such calls in cluster tests (note that some come from `rolling_restart`). So, it looks like this sleep makes cluster tests 300 * 2s = 10min slower. Indeed, `./test.py --mode=dev cluster` takes 61min instead of 71min on the potwor machine (the one in the Warsaw office) without it. We set `shutdown_announce_in_ms` to 0 for all cluster tests to make them faster. The sleep is completely unnecessary in tests. Removing it could introduce flakiness, but if that's the case, then the test for which it happens is incorrect in the first place. Tests shouldn't assume that all nodes receive and handle the shutdown message in 2s. They should use functions like `server_not_sees_other_server` instead, which are faster and more reliable.
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.