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 <nyh@scylladb.com>
This commit is contained in:
@@ -24,6 +24,15 @@ urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
|
|||||||
print('Scylla is: ' + run.find_scylla() + '.')
|
print('Scylla is: ' + run.find_scylla() + '.')
|
||||||
|
|
||||||
extra_scylla_options = []
|
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:
|
if "-h" in sys.argv or "--help" in sys.argv:
|
||||||
run.run_pytest(sys.path[0], 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 += ['--alternator-port', '8000']
|
||||||
cmd += extra_scylla_options
|
cmd += extra_scylla_options
|
||||||
|
|
||||||
|
for i in remove_scylla_options:
|
||||||
|
cmd.remove(i)
|
||||||
|
|
||||||
return (cmd, env)
|
return (cmd, env)
|
||||||
|
|
||||||
pid = run.run_with_temporary_dir(run_alternator_cmd)
|
pid = run.run_with_temporary_dir(run_alternator_cmd)
|
||||||
|
|||||||
Reference in New Issue
Block a user