Commit 88788eee authored by Leif Walsh's avatar Leif Walsh Committed by Yoni Fogel

refs #5389 fix test_stress_with_verify to exit earlier when time is up


git-svn-id: file:///svn/toku/tokudb@47016 c7de825b-a66e-492c-adef-691d508d4ae1
parent 1aaaced5
...@@ -886,11 +886,20 @@ static int UU() keyrange_op(DB_TXN *txn, ARG arg, void* UU(operation_extra), voi ...@@ -886,11 +886,20 @@ static int UU() keyrange_op(DB_TXN *txn, ARG arg, void* UU(operation_extra), voi
return r; return r;
} }
static int verify_progress_callback(void *UU(extra), float UU(progress)) {
if (!run_test) {
return -1;
}
}
static int UU() verify_op(DB_TXN* UU(txn), ARG UU(arg), void* UU(operation_extra), void *UU(stats_extra)) { static int UU() verify_op(DB_TXN* UU(txn), ARG UU(arg), void* UU(operation_extra), void *UU(stats_extra)) {
int r = 0; int r = 0;
for (int i = 0; i < arg->cli->num_DBs; i++) { for (int i = 0; i < arg->cli->num_DBs && run_test; i++) {
DB* db = arg->dbp[i]; DB* db = arg->dbp[i];
r = db->verify_with_progress(db, NULL, NULL, 1, 0); r = db->verify_with_progress(db, verify_progress_callback, nullptr, 1, 0);
if (!run_test) {
r = 0;
}
CKERR(r); CKERR(r);
} }
return r; return r;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment