This is an automated email from the ASF dual-hosted git repository. davisp pushed a commit to branch optimize-doc-updates in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 6853c32934e949ba75b579ae6eda1f7dae27de10 Author: Paul J. Davis <[email protected]> AuthorDate: Thu Nov 2 16:13:48 2017 -0500 Fix should_create_no_conflicts_on_merge test This test is actually testing that the old stemming algorithm with correct a badly formatted tree after a revision had been incorrectly merged. This is no renamed `full_stem` which only happens at compaction time. --- src/couch/test/couch_key_tree_tests.erl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/couch/test/couch_key_tree_tests.erl b/src/couch/test/couch_key_tree_tests.erl index 97ef33d..f555ff7 100644 --- a/src/couch/test/couch_key_tree_tests.erl +++ b/src/couch/test/couch_key_tree_tests.erl @@ -40,7 +40,7 @@ key_tree_merge_test_()-> should_merge_tree_with_large_stem(), should_merge_stems(), should_create_conflicts_on_merge(), - should_create_no_conflicts_on_merge(), + should_create_no_conflicts_on_full_stem(), should_ignore_conflicting_branch() ] } @@ -236,12 +236,12 @@ should_create_conflicts_on_merge()-> ?_assertEqual({[OneChild, Stemmed], new_branch}, couch_key_tree:merge([OneChild], Stemmed, ?DEPTH)). -should_create_no_conflicts_on_merge()-> +should_create_no_conflicts_on_full_stem()-> OneChild = {1, {"1","foo",[{"1a", "bar", []}]}}, Stemmed = {3, {"1aa", "bar", []}}, TwoChild = {1, {"1","foo", [{"1a", "bar", [{"1aa", "bar", []}]}]}}, - ?_assertEqual({[TwoChild], new_leaf}, - couch_key_tree:merge([OneChild, Stemmed], TwoChild, ?DEPTH)). + {Merged, new_leaf} = couch_key_tree:merge([OneChild, Stemmed], TwoChild), + ?_assertEqual([TwoChild], couch_key_tree:full_stem(Merged, ?DEPTH)). should_ignore_conflicting_branch()-> %% this test is based on couch-902-test-case2.py -- To stop receiving notification emails like this one, please contact "[email protected]" <[email protected]>.
