close[t:4045] Fixes #4045. The trick is to abort if we run out of work before the bad write appears.

git-svn-id: file:///svn/toku/tokudb@35708 c7de825b-a66e-492c-adef-691d508d4ae1
This commit is contained in:
Bradley C. Kuszmaul 2013-04-16 23:59:51 -04:00 committed by Yoni Fogel
parent 837428ebaf
commit 19e71d77ec

View file

@ -174,6 +174,9 @@ do_writes_that_fail (void) {
db_env_set_func_full_write (write_counting_and_failing);
write_count=0;
do_db_work();
if (fail_at != FAIL_NEVER && write_count <= fail_at) {
abort(); // if we don't encounter the write (because there are not enough), then in fail_at mode, we need to abort so that the test will be happy.
}
printf("%d", write_count);
}