couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject [couchdb] 02/02: Fix should_create_no_conflicts_on_full_stem test case
Date Tue, 16 Jan 2018 16:07:17 GMT
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 16717bb1ff0875d1710faaafc96eb296764a6adb
Author: Nick Vatamaniuc <vatamane@apache.org>
AuthorDate: Mon Jan 15 17:32:46 2018 -0500

    Fix should_create_no_conflicts_on_full_stem test case
    
    Add comment explaining how full stem will be run in the repair_tree
    function when a common tree node is found.
---
 src/couch/test/couch_key_tree_tests.erl | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/couch/test/couch_key_tree_tests.erl b/src/couch/test/couch_key_tree_tests.erl
index 53e7832..905c990 100644
--- a/src/couch/test/couch_key_tree_tests.erl
+++ b/src/couch/test/couch_key_tree_tests.erl
@@ -241,11 +241,14 @@ should_create_conflicts_on_merge()->
                   couch_key_tree:merge([OneChild], Stemmed, ?DEPTH)).
 
 should_create_no_conflicts_on_full_stem()->
+    %% Full stem is run from couch_key_tree:repair_tree/2. That is triggered
+    %% when a matching node ("1aa") is found in the rev tree and the tree to
+    %% be merged.
     OneChild = {1, {"1","foo",[{"1a", "bar", []}]}},
     Stemmed = {3, {"1aa", "bar", []}},
     TwoChild = {1, {"1","foo", [{"1a", "bar", [{"1aa", "bar", []}]}]}},
     {Merged, new_leaf} = couch_key_tree:merge([OneChild, Stemmed], TwoChild),
-    ?_assertEqual([TwoChild], couch_key_tree:full_stem(Merged, ?DEPTH)).
+    ?_assertEqual([TwoChild], couch_key_tree: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
"commits@couchdb.apache.org" <commits@couchdb.apache.org>.

Mime
View raw message