nickva commented on a change in pull request #2540: Use multi-transactional iterators URL: https://github.com/apache/couchdb/pull/2540#discussion_r379628925
########## File path: src/fabric/test/fabric2_changes_fold_tests.erl ########## @@ -21,28 +21,56 @@ -define(DOC_COUNT, 25). +-define(PDICT_ERROR_IN_FOLD_RANGE, '$fabric2_error_in_fold_range'). +-define(PDICT_ERROR_IN_USER_FUN, '$fabric2_error_throw_in_user_fun'). + changes_fold_test_() -> { "Test changes fold operations", { setup, - fun setup/0, - fun cleanup/1, - with([ - ?TDEF(fold_changes_basic), - ?TDEF(fold_changes_since_now), - ?TDEF(fold_changes_since_seq), - ?TDEF(fold_changes_basic_rev), - ?TDEF(fold_changes_since_now_rev), - ?TDEF(fold_changes_since_seq_rev) - ]) + fun setup_all/0, + fun teardown_all/1, + { + foreach, + fun setup/0, + fun cleanup/1, + [ + ?TDEF_FE(fold_changes_basic), + ?TDEF_FE(fold_changes_since_now), + ?TDEF_FE(fold_changes_since_seq), + ?TDEF_FE(fold_changes_basic_rev), + ?TDEF_FE(fold_changes_since_now_rev), + ?TDEF_FE(fold_changes_since_seq_rev), + ?TDEF_FE(fold_changes_basic_tx_too_long), + ?TDEF_FE(fold_changes_reverse_tx_too_long), + ?TDEF_FE(fold_changes_tx_too_long_with_single_row_emits), + ?TDEF_FE(fold_changes_since_seq_tx_too_long), + ?TDEF_FE(fold_changes_not_progressing) + ] + } } }. -setup() -> +setup_all() -> Ctx = test_util:start_couch([fabric]), + meck:new(erlfdb, [passthrough]), + Ctx. + + +teardown_all(Ctx) -> + meck:unload(), + test_util:stop_couch(Ctx). + + +setup() -> + meck:reset([erlfdb]), Review comment: It just rests call counts. I never ended up using call counts. I'll remove the line ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services