mirror of
https://github.com/scylladb/scylladb.git
synced 2026-04-21 00:50:35 +00:00
Some of the tests in test/cql-pytest share the same table but use different keys to ensure they don't collide. Before this patch we used a random key, which was usually fine, but we recently noticed that the pytest-randomly plugin may cause different tests to run through the *same* sequence of random numbers and ruin our intent that different tests use different keys. So instead of using a *random* key, let's use a *unique* key. We can achieve this uniqueness trivially - using a counter variable - because anyway the uniqueness is only needed inside a single temporary table - which is different in every run. Another benefit is that it will now be clearer that the tests are deterministic and not random - the intent of a random_string() key was never to randomly walk the entire key space (random_string() anyway had a pretty narrow idea of what a random string looks like) - it was just to get a unique key. Refs #9988 (fixes it for cql-pytest, but not for test/alternator) Signed-off-by: Nadav Har'El <nyh@scylladb.com>
7.9 KiB
7.9 KiB