Skip to content

Commit

Permalink
tools/db_crashtest2.py should run on the same DB
Browse files Browse the repository at this point in the history
Summary:
Crash tests are supposed to restart the same DB after crashing, but it is now opening a different DB. Fix it.
It's probably a leftover of https://reviews.facebook.net/D17073

Test Plan: Run the test and make sure the same Db is opened.

Reviewers: kradhakrishnan, rven, igor, IslamAbdelRahman, yhchiang, anthony

Reviewed By: anthony

Subscribers: leveldb, dhruba

Differential Revision: https://reviews.facebook.net/D43197
  • Loading branch information
siying committed Jul 29, 2015
1 parent d06c82e commit 7bfae3a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/db_crashtest2.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@ def main(argv):
total_check_mode = 4
check_mode = 0

dbname = tempfile.mkdtemp(prefix='rocksdb_crashtest_')
while time.time() < exit_time:
killoption = ""
if check_mode == 0:
Expand All @@ -85,7 +86,6 @@ def main(argv):
# normal run
additional_opts = "--ops_per_thread=" + str(ops_per_thread)

dbname = tempfile.mkdtemp(prefix='rocksdb_crashtest_')
cmd = re.sub('\s+', ' ', """
./db_stress
--test_batches_snapshots=%s
Expand Down

0 comments on commit 7bfae3a

Please sign in to comment.