mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-03 13:37:04 +00:00
After a failed test, the cluster might be down so dropping the random_tables keyspace might be impossible. The cluster will be marked dirty so it doesn't matter that we leave any garbage there. Note: we already drop only if the cluster is not marked as dirty, and we mark the cluster as dirty after a failed test. However, marking the cluster as dirty after a failed test happens at the end of the `manager` fixture and the `random_tables` fixture depends on the `manager` fixture, so at the end of the `random_tables` fixture the cluster still wasn't marked as dirty. Hence the fixture must access the pytest-provided `request` fixture where we store a flag whether the test has failed.