Skip to content

Commit

Permalink
Remove and recreate expected values dir in white-box testing 2nd half (
Browse files Browse the repository at this point in the history
…#10743)

Summary:
**Context:**
#10732 (review)

Pull Request resolved: #10743

Test Plan:
- Locally run `python3 ./tools/db_crashtest.py whitebox --simple -max_key=1000000 -value_size_mult=33 -write_buffer_size=524288 -target_file_size_base=524288 -max_bytes_for_level_base=2097152 --duration=120 --interval=10 --ops_per_thread=1000 --random_kill_odd=887`
- CI jobs testing

Reviewed By: ajkr

Differential Revision: D39838733

Pulled By: ajkr

fbshipit-source-id: 9e819b66b0293dfc7a31a908a9d42c6baca4aeaa
  • Loading branch information
hx235 authored and facebook-github-bot committed Sep 29, 2022
1 parent 5f4b736 commit aa71464
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tools/db_crashtest.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,10 @@ def whitebox_crash_main(args, unknown_args):
# success
shutil.rmtree(dbname, True)
os.mkdir(dbname)
cmd_params.pop("expected_values_dir", None)
if (expected_values_dir is not None):
shutil.rmtree(expected_values_dir, True)
os.mkdir(expected_values_dir)

check_mode = (check_mode + 1) % total_check_mode

time.sleep(1) # time to stabilize after a kill
Expand Down

0 comments on commit aa71464

Please sign in to comment.