diff options
author | jiangph <jiangph@cn.ibm.com> | 2018-12-25 18:23:00 +0800 |
---|---|---|
committer | jiangph <jiangph@cn.ibm.com> | 2019-01-03 10:13:28 +0800 |
commit | d12c22b23f00d2674d5155b6c5aa41a8ad240f94 (patch) | |
tree | c36eba4ea3eb44078de1156a772acd82a29dec67 | |
parent | f708c05152ccd6f704f53faf1113550958a6ef6f (diff) | |
download | couchdb-d12c22b23f00d2674d5155b6c5aa41a8ad240f94.tar.gz |
Introduce cpse_test_purge_seqs again
- Re-introduce cpse_test_purge_seqs after fixing issue on
cpse_test_purge_seqs:cpse_increment_purge_seq_on_partial_purge/1
with undef issue
-rw-r--r-- | src/couch_pse_tests/src/cpse_test_purge_seqs.erl | 12 | ||||
-rw-r--r-- | src/couch_pse_tests/src/cpse_util.erl | 3 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/couch_pse_tests/src/cpse_test_purge_seqs.erl b/src/couch_pse_tests/src/cpse_test_purge_seqs.erl index 057d6da33..f363b76bb 100644 --- a/src/couch_pse_tests/src/cpse_test_purge_seqs.erl +++ b/src/couch_pse_tests/src/cpse_test_purge_seqs.erl @@ -12,7 +12,6 @@ -module(cpse_test_purge_seqs). -compile(export_all). --compile(nowarn_export_all). -include_lib("eunit/include/eunit.hrl"). @@ -99,10 +98,13 @@ cpse_increment_purge_multiple_times(DbName) -> cpse_increment_purge_seq_on_partial_purge(DbName) -> - Doc1 = {[{'_id', foo}, {vsn, 1}]}, - Doc2 = {[{'_id', foo}, {vsn, 2}]}, - {ok, Rev1} = cpse_util:save_doc(DbName, Doc1), - {ok, _Rev2} = cpse_util:save_doc(DbName, Doc2, [replicated_changes]), + {ok, Rev1} = cpse_util:save_doc(DbName, {[{'_id', foo1}, {vsn, <<"1.1">>}]}), + Update = {[ + {'_id', foo1}, + {'_rev', couch_doc:rev_to_str({1, [crypto:hash(md5, <<"1.2">>)]})}, + {vsn, <<"1.2">>} + ]}, + {ok, [_Rev2]} = cpse_util:save_docs(DbName, [Update], [replicated_changes]), cpse_util:assert_db_props(?MODULE, ?LINE, DbName, [ {doc_count, 1}, diff --git a/src/couch_pse_tests/src/cpse_util.erl b/src/couch_pse_tests/src/cpse_util.erl index 7556d234b..1bf24314e 100644 --- a/src/couch_pse_tests/src/cpse_util.erl +++ b/src/couch_pse_tests/src/cpse_util.erl @@ -31,7 +31,8 @@ cpse_test_purge_replication, cpse_test_purge_bad_checkpoints, cpse_test_compaction, - cpse_test_ref_counting + cpse_test_ref_counting, + cpse_test_purge_seqs ]). |