diff options
author | Paul J. Davis <paul.joseph.davis@gmail.com> | 2017-11-02 16:13:48 -0500 |
---|---|---|
committer | Nick Vatamaniuc <vatamane@apache.org> | 2018-01-15 17:37:46 -0500 |
commit | 715378eb99a8d9ae7d2fc03a34f3cb58626ed481 (patch) | |
tree | b2e8b582ae53020049058e7a0684551d737b20de | |
parent | 702de96f18a4a9c949009b9206cbcd621aecd873 (diff) | |
download | couchdb-715378eb99a8d9ae7d2fc03a34f3cb58626ed481.tar.gz |
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.
-rw-r--r-- | src/couch/test/couch_key_tree_tests.erl | 8 |
1 files 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 2b7d5fe62..53e783251 100644 --- a/src/couch/test/couch_key_tree_tests.erl +++ b/src/couch/test/couch_key_tree_tests.erl @@ -44,7 +44,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() ] } @@ -240,12 +240,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 |