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 <module>
    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 <lambda>
    "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
This commit is contained in:
Zhongyi Xie 2018-09-19 12:08:42 -07:00 committed by Facebook Github Bot
parent a0ebec3804
commit 9b3cf908a6

View File

@ -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'