From 4d6b286345681dbbef8864f580c31debf9c73d8a Mon Sep 17 00:00:00 2001 From: Nadav Har'El Date: Sun, 21 Jan 2024 16:43:02 +0200 Subject: [PATCH] test/alternator: add "--vnodes" option to run script test/cql-pytest/run.py was recently modified to add the "tablets" experimental feature, so test/alternator/run now also runs Scylla by default with tablets enabled. 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/alternator/run script. This option causes "run" to run Scylla without enabling the "tablets" experimental feature. Signed-off-by: Nadav Har'El --- test/alternator/run | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/test/alternator/run b/test/alternator/run index e0d6f1ad17..707494db3b 100755 --- a/test/alternator/run +++ b/test/alternator/run @@ -24,6 +24,15 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning) print('Scylla is: ' + run.find_scylla() + '.') extra_scylla_options = [] +remove_scylla_options = [] + +# 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') + remove_scylla_options.append('--experimental-features=tablets') if "-h" in sys.argv or "--help" in sys.argv: run.run_pytest(sys.path[0], sys.argv) @@ -60,6 +69,9 @@ def run_alternator_cmd(pid, dir): cmd += ['--alternator-port', '8000'] cmd += extra_scylla_options + for i in remove_scylla_options: + cmd.remove(i) + return (cmd, env) pid = run.run_with_temporary_dir(run_alternator_cmd)