Use the correct sequence for replication status The value of source_seq is just what's been seen, not what's actually been stored on the target. We expose through_seq now to show the actual progress.
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/ed4f4961 Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/ed4f4961 Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/ed4f4961 Branch: refs/heads/1963-eunit-bigcouch Commit: ed4f4961a3d305c236081bb587c0cc1bdd9f72ec Parents: 16b7ecf Author: Paul J. Davis <[email protected]> Authored: Tue Aug 12 16:00:39 2014 -0500 Committer: Paul J. Davis <[email protected]> Committed: Tue Aug 12 16:00:39 2014 -0500 ---------------------------------------------------------------------- share/www/script/test/replication.js | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/couchdb/blob/ed4f4961/share/www/script/test/replication.js ---------------------------------------------------------------------- diff --git a/share/www/script/test/replication.js b/share/www/script/test/replication.js index c883374..21a4304 100644 --- a/share/www/script/test/replication.js +++ b/share/www/script/test/replication.js @@ -175,7 +175,7 @@ couchTests.replication = function(debug) { do { var task = getTask(rep_id, 0); - if(task && task["source_seq"] == sourceSeq) { + if(task && task["through_seq"] == sourceSeq) { return; } t1 = new Date(); @@ -1385,19 +1385,9 @@ couchTests.replication = function(debug) { while (sourceDb.info().compact_running) {}; TEquals(true, sourceDb.save(makeDocs(30, 31)[0]).ok); - xhr = CouchDB.request("GET", "/_active_tasks"); - var xhr = CouchDB.request("GET", "/_active_tasks"); - var tasks = JSON.parse(xhr.responseText); - - var found_task = false; - for(var i = 0; i < tasks.length; i++) { - if(tasks[i].replication_id == repResult._local_id) { - found_task = true; - break; - } - } - TEquals(true, found_task); + var task = getTask(repResult._local_id, 1000); + T(task != null); waitForSeq(sourceDb, targetDb, repResult._local_id); T(sourceDb.open("30") !== null);
