Skip to content

Commit

Permalink
add missing range in random.choice argument (facebook#4397)
Browse files Browse the repository at this point in the history
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: facebook#4397

Differential Revision: D9933041

Pulled By: miasantreble

fbshipit-source-id: 10998e5bc6b6a5cea3e4088b18465affc246e639
  • Loading branch information
miasantreble authored and facebook-github-bot committed Sep 19, 2018
1 parent a0ebec3 commit 9b3cf90
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/db_crashtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
"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'
Expand Down

0 comments on commit 9b3cf90

Please sign in to comment.