From 0bef50ef0cea3aa0ee11ea365d4a1dbe9de0a0bf Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Sun, 21 Jan 2024 11:03:50 +0200 Subject: [PATCH] cql-pytest: add "--vnodes" option to "run" script Running test/cql-pytest/run now defaults to enabling the "tablets" experimental feature when running Scylla - and tests detect this and use this feature as appropriate. This is the correct default going forward, but in the short term it would be nice to also have an option to easily do a manual test run *without* tablets. So this patch adds a "--vnodes" option to the test/cql-pytest/run script. This option causes "run" to run Scylla without enabling the "tablets" experimental feature. Signed-off-by: Nadav Har'El Closes scylladb/scylladb#16896 --- test/cql-pytest/run | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/test/cql-pytest/run b/test/cql-pytest/run index 5935937706..cce4318c80 100755 --- a/test/cql-pytest/run +++ b/test/cql-pytest/run @@ -14,6 +14,19 @@ else: cmd = run.run_scylla_cmd check_cql = run.check_cql +# If the "--vnodes" option is given, drop the "tablets" experimental +# feature (turned on in run.py) so that all tests will be run with the +# old vnode-based replication instead of tablets. This option only has +# temporary usefulness, and should eventually be removed. +if '--vnodes' in sys.argv: + sys.argv.remove('--vnodes') + def run_without_tablets(pid, dir): + (c, e) = run_without_tablets.orig_cmd(pid, dir) + c.remove('--experimental-features=tablets') + return (c, e) + run_without_tablets.orig_cmd = cmd + cmd = run_without_tablets + if "-h" in sys.argv or "--help" in sys.argv: run.run_pytest(sys.path[0], sys.argv) exit(0)