mirror of
https://github.com/scylladb/scylladb.git
synced 2026-06-06 06:53:12 +00:00
`after_test` would count keyspaces and check that the number is the same as before the test started. The `random_tables` fixture after a test would drop the keyspace that it created before the test. These steps are done to ensure that the cluster is ready to be reused for the next steps. If the cluster is dirty, it cannot be reused anyway, so the steps are unnecessary. They might also be impossible in general - a dirty cluster might be completely dead. For example, the attempts to drop a keyspace from `random_tables` would cause confusing errors if a test failed when it tried to restart a node while all nodes were down, making it harder to find the 'real' failure. Therefore don't perform these operations if the cluster is dirty.