Before this patch, we had in test_condition_expression.py and test_update_expression.py some rudimentary tests that the different write isolation modes behave as expected. Basically, we wanted to test that read-modify-write (RMW) operations are recognized and forbidden in forbid_rmw mode, but work correctly in the three other modes. We only check non-concurrent writes, so the actual write isolation is NOT checked, just the correctness of non-concurrent writes. However, since these tests were split across several files, and many of the tests just ran other existing tests in different write isolation modes, it was hard to see what exactly was being tested, and what was missed. And indeed we missed checking some RMW operations, such as requests with ReturnValues, requests with the older Expected or AttributeUpdates (only the newer ConditionExpression and UpdateExpression were tested), and ADD and DELETE operations in UpdateExpression. So this patch replaces the existing partial tests with a new test file test_write_isolation.py dedicated to testing all kinds of RMW operations in one place, and how they don't work in forbid_rmw and do work in the other modes. Writing all these tests in one place made it easier to create a really exhaustive test of all the different operations and optional parameters, and conversely - make sure that we don't test *unnecessary* things such as different ConditionExpression expressions (we already have 1800 lines of tests for ConditionExpression, and the actual content of the condition is unrelated to write isolation modes). Signed-off-by: Nadav Har'El <nyh@scylladb.com>
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.