summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul J. Davis <paul.joseph.davis@gmail.com>2017-11-02 16:11:03 -0500
committerNick Vatamaniuc <vatamane@apache.org>2018-01-15 17:37:46 -0500
commit702de96f18a4a9c949009b9206cbcd621aecd873 (patch)
tree629604f1190b0067fb636a9af46ef5f4f53559e4
parent05f52abc8a16b04b0a179b23b846c4a7c931638d (diff)
downloadcouchdb-702de96f18a4a9c949009b9206cbcd621aecd873.tar.gz
Fix should_merge_tree_of_odd_length test
This test was invalid as merging does not support anything but a linear path. This merge failure was covered up by stemming completely disassembling and reassembling the badly merged tree.
-rw-r--r--src/couch/test/couch_key_tree_tests.erl5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/couch/test/couch_key_tree_tests.erl b/src/couch/test/couch_key_tree_tests.erl
index 399d5b17c..2b7d5fe62 100644
--- a/src/couch/test/couch_key_tree_tests.erl
+++ b/src/couch/test/couch_key_tree_tests.erl
@@ -191,9 +191,8 @@ should_merge_tree_of_odd_length()->
{"1b", "bar", []}]}},
TwoChildPlusSibs = {1, {"1","foo", [{"1a", "bar", [{"1aa", "bar", []}]},
{"1b", "bar", []}]}},
-
- ?_assertEqual({[TwoChildPlusSibs], new_branch},
- couch_key_tree:merge([TwoChild], TwoChildSibs, ?DEPTH)).
+ ?_assertEqual({[TwoChildPlusSibs], new_leaf},
+ couch_key_tree:merge([TwoChildSibs], TwoChild, ?DEPTH)).
should_merge_tree_with_stem()->
Stemmed = {2, {"1a", "bar", []}},