couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kocol...@apache.org
Subject svn commit: r807468 - /couchdb/trunk/test/etap/112-replication-missing-revs.t
Date Tue, 25 Aug 2009 03:52:24 GMT
Author: kocolosk
Date: Tue Aug 25 03:52:23 2009
New Revision: 807468

URL: http://svn.apache.org/viewvc?rev=807468&view=rev
Log:
update etap; missing_revs output now includes DB update_seq

Modified:
    couchdb/trunk/test/etap/112-replication-missing-revs.t

Modified: couchdb/trunk/test/etap/112-replication-missing-revs.t
URL: http://svn.apache.org/viewvc/couchdb/trunk/test/etap/112-replication-missing-revs.t?rev=807468&r1=807467&r2=807468&view=diff
==============================================================================
--- couchdb/trunk/test/etap/112-replication-missing-revs.t (original)
+++ couchdb/trunk/test/etap/112-replication-missing-revs.t Tue Aug 25 03:52:23 2009
@@ -113,8 +113,8 @@
 test_changes_not_missing(SrcType, TgtType) ->
     %% put identical changes on source and target
     Id = couch_util:new_uuid(),
-    {Id, [Rev]} = Expect = generate_change(Id, {[]}, get_db(source)),
-    {Id, [Rev]} = generate_change(Id, {[]}, get_db(target)),
+    {Id, _Seq, [Rev]} = Expect = generate_change(Id, {[]}, get_db(source)),
+    {Id, _, [Rev]} = generate_change(Id, {[]}, get_db(target)),
 
     %% confirm that this change is not in missing revs feed
     {ok, Pid1} = start_changes_feed(SrcType, 0, false),
@@ -141,9 +141,10 @@
 
 generate_change(Id, EJson, Db) ->
     Doc = couch_doc:from_json_obj(EJson),
+    Seq = get_update_seq(),
     {ok, Rev} = couch_db:update_doc(Db, Doc#doc{id = Id}, [full_commit]),
     couch_db:close(Db),
-    {Id, [Rev]}.
+    {Id, Seq+1, [Rev]}.
 
 get_all_missing_revs(Pid, {HighSeq, Revs}) ->
     case couch_rep_missing_revs:next(Pid) of
@@ -160,6 +161,12 @@
     {ok, Db} = couch_db:open(<<"etap-test-target">>, []),
     Db.
 
+get_update_seq() ->
+    Db = get_db(source),
+    Seq = couch_db:get_update_seq(Db),
+    couch_db:close(Db),
+    Seq.
+
 setup() ->
     {ok, DbA} = couch_db:create(<<"etap-test-source">>, []),
     {ok, DbB} = couch_db:create(<<"etap-test-target">>, []),



Mime
View raw message