mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-27 03:45:11 +00:00
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>
22 KiB
22 KiB