From 3c71d543dd863a4b34a779a6b05de1f10b57a3a0 Mon Sep 17 00:00:00 2001 From: Adam Kocoloski Date: Wed, 29 Dec 2010 03:01:01 +0000 Subject: Skip recursive path merging, COUCHDB-968 This patch ensures that we only ever merge a linear path into the tree. It relies on the stemming code to collapse paths that could have been merged together by a recursive use of merge_one. git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1053512 13f79535-47bb-0310-9956-ffa450edef68 --- test/etap/060-kt-merging.t | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test') diff --git a/test/etap/060-kt-merging.t b/test/etap/060-kt-merging.t index 5a8571ac..971e49bf 100755 --- a/test/etap/060-kt-merging.t +++ b/test/etap/060-kt-merging.t @@ -15,7 +15,7 @@ main(_) -> test_util:init_code_path(), - etap:plan(12), + etap:plan(14), case (catch test()) of ok -> etap:end_tests(); @@ -106,10 +106,13 @@ test() -> "Merging should create conflicts." ), + {MultiPaths, NoConflicts} = couch_key_tree:merge(Expect1, TwoChild), + etap:is(NoConflicts, no_conflicts, "Merge should have no conflicts."), + etap:is(length(MultiPaths), 2, "Should have two paths before stemming."), etap:is( - {[TwoChild], no_conflicts}, - couch_key_tree:merge(Expect1, TwoChild), - "Merge should have no conflicts." + couch_key_tree:stem(MultiPaths, 10), + [TwoChild], + "Stemming should collapse the paths." ), ok. -- cgit v1.2.3