Commit de8b65f2 authored by Yoni Fogel's avatar Yoni Fogel

Closes #1744 test_abort4.tdbrun now passes

git-svn-id: file:///svn/toku/tokudb@11718 c7de825b-a66e-492c-adef-691d508d4ae1
parent b641a982
......@@ -109,7 +109,6 @@ TDB_TESTS_THAT_SHOULD_FAIL= \
test_truncate_txn_abort \
test_txn_nested_abort3 \
test_txn_nested_abort4 \
test_abort4 \
#\ ends prev line
ifneq ($(OS_CHOICE),windows)
TDB_TESTS_THAT_SHOULD_FAIL+= \
......
......@@ -55,6 +55,7 @@ static void
abort_txn(void) {
find_num = 0;
int r = txn->abort(txn); CKERR(r);
txn = NULL;
}
#ifndef DB_YESOVERWRITE
......@@ -93,11 +94,16 @@ test_insert_and_abort_and_insert(u_int32_t num_to_insert) {
find_num = num_to_insert / 2;
u_int32_t k, v;
u_int32_t i;
int r;
r=env->txn_begin(env, 0, &txn, 0); CKERR(r);
r=db->pre_acquire_table_lock(db, txn); CKERR(r);
for (i=0; i < find_num; i++) {
k = htonl(i);
v = htonl(i+5);
put(k, v);
}
txn->commit(txn, 0);
txn = NULL;
}
#define bit0 (1<<0)
......@@ -144,6 +150,11 @@ runtests(u_int32_t dup_flags) {
verify_and_tear_down(close_first);
u_int32_t n;
for (n = 1; n < 1<<20; n*=2) {
if (verbose) {
printf("\t%s:%d-%s() dup=%05x close_first=%d n=%06x\n",
__FILE__, __LINE__, __FUNCTION__, dup_flags, close_first, n);
fflush(stdout);
}
init(dup_flags);
test_insert_and_abort(n);
verify_and_tear_down(close_first);
......@@ -156,7 +167,9 @@ runtests(u_int32_t dup_flags) {
}
int
test_main (int UU(argc), char UU(*argv[])) {
test_main(int argc, char *argv[]) {
parse_args(argc, argv);
runtests(0);
runtests(DB_DUPSORT|DB_DUP);
return 0;
......
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