From 9b3cf908a6c9ee8b3c4e39ed7d127f18d9ffd184 Mon Sep 17 00:00:00 2001 From: Zhongyi Xie Date: Wed, 19 Sep 2018 12:08:42 -0700 Subject: [PATCH] add missing range in random.choice argument (#4397) Summary: This will fix the broken asan crash test: > Traceback (most recent call last): File "tools/db_crashtest.py", line 384, in main() File "tools/db_crashtest.py", line 368, in main parser.add_argument("--" + k, type=type(v() if callable(v) else v)) File "tools/db_crashtest.py", line 59, in "index_block_restart_interval": lambda: random.choice(1, 16), TypeError: choice() takes exactly 2 arguments (3 given) Pull Request resolved: https://github.com/facebook/rocksdb/pull/4397 Differential Revision: D9933041 Pulled By: miasantreble fbshipit-source-id: 10998e5bc6b6a5cea3e4088b18465affc246e639 --- tools/db_crashtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/db_crashtest.py b/tools/db_crashtest.py index c71c8c99d..59528128b 100644 --- a/tools/db_crashtest.py +++ b/tools/db_crashtest.py @@ -56,7 +56,7 @@ default_params = { "write_buffer_size": 4 * 1024 * 1024, "writepercent": 35, "format_version": lambda: random.randint(2, 4), - "index_block_restart_interval": lambda: random.choice(1, 16), + "index_block_restart_interval": lambda: random.choice(range(1, 16)), } _TEST_DIR_ENV_VAR = 'TEST_TMPDIR'