diff options
author | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-24 16:11:39 +0000 |
---|---|---|
committer | Filipe David Borba Manana <fdmanana@apache.org> | 2010-11-24 16:11:39 +0000 |
commit | a61f2eb606d20aa4f790fe927cf31c5f96754527 (patch) | |
tree | 9779b9201b790172649a14e3cbf83d553cc08641 /share/www | |
parent | 894d8f2cc9c8ebaf6ff025de393b3d95be4bd548 (diff) |
Merged revision 1038665 from trunk:
Replicator DB: added _replication_state_time (a unix timestamp value) to replication documents.
git-svn-id: https://svn.apache.org/repos/asf/couchdb/branches/1.1.x@1038666 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'share/www')
-rw-r--r-- | share/www/script/test/replicator_db.js | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/share/www/script/test/replicator_db.js b/share/www/script/test/replicator_db.js index 7df57a8c..3c6a5d8e 100644 --- a/share/www/script/test/replicator_db.js +++ b/share/www/script/test/replicator_db.js @@ -104,6 +104,7 @@ couchTests.replicator_db = function(debug) { T(repDoc1.source === repDoc.source); T(repDoc1.target === repDoc.target); T(repDoc1._replication_state === "completed", "simple"); + T(typeof repDoc1._replication_state_time === "number"); T(typeof repDoc1._replication_id === "string"); } @@ -155,6 +156,7 @@ couchTests.replicator_db = function(debug) { T(repDoc1.source === repDoc.source); T(repDoc1.target === repDoc.target); T(repDoc1._replication_state === "completed", "filtered"); + T(typeof repDoc1._replication_state_time === "number"); T(typeof repDoc1._replication_id === "string"); } @@ -198,6 +200,7 @@ couchTests.replicator_db = function(debug) { T(repDoc1.source === repDoc.source); T(repDoc1.target === repDoc.target); T(repDoc1._replication_state === "triggered"); + T(typeof repDoc1._replication_state_time === "number"); T(typeof repDoc1._replication_id === "string"); // add a design doc to source, it will be replicated to target @@ -312,6 +315,7 @@ couchTests.replicator_db = function(debug) { T(repDoc1_copy.source === repDoc1.source); T(repDoc1_copy.target === repDoc1.target); T(repDoc1_copy._replication_state === "completed"); + T(typeof repDoc1_copy._replication_state_time === "number"); T(typeof repDoc1_copy._replication_id === "string"); var newDoc = { @@ -342,6 +346,7 @@ couchTests.replicator_db = function(debug) { T(repDoc2_copy.source === repDoc1.source); T(repDoc2_copy.target === repDoc1.target); T(repDoc2_copy._replication_state === "completed"); + T(typeof repDoc2_copy._replication_state_time === "number"); T(typeof repDoc2_copy._replication_id === "string"); T(repDoc2_copy._replication_id === repDoc1_copy._replication_id); } @@ -378,11 +383,13 @@ couchTests.replicator_db = function(debug) { repDoc1 = repDb.open("foo_dup_rep_doc_1"); T(repDoc1 !== null); T(repDoc1._replication_state === "completed", "identical"); + T(typeof repDoc1._replication_state_time === "number"); T(typeof repDoc1._replication_id === "string"); repDoc2 = repDb.open("foo_dup_rep_doc_2"); T(repDoc2 !== null); T(typeof repDoc2._replication_state === "undefined"); + T(typeof repDoc2._replication_state_time === "undefined"); T(repDoc2._replication_id === repDoc1._replication_id); } @@ -420,11 +427,13 @@ couchTests.replicator_db = function(debug) { repDoc1 = repDb.open("foo_dup_cont_rep_doc_1"); T(repDoc1 !== null); T(repDoc1._replication_state === "triggered"); + T(typeof repDoc1._replication_state_time === "number"); T(typeof repDoc1._replication_id === "string"); repDoc2 = repDb.open("foo_dup_cont_rep_doc_2"); T(repDoc2 !== null); T(typeof repDoc2._replication_state === "undefined"); + T(typeof repDoc2._replication_state_time === "undefined"); T(repDoc2._replication_id === repDoc1._replication_id); var newDoc = { @@ -444,6 +453,7 @@ couchTests.replicator_db = function(debug) { repDoc1 = repDb.open("foo_dup_cont_rep_doc_1"); T(repDoc1 !== null); T(repDoc1._replication_state === "triggered"); + T(typeof repDoc1._replication_state_time === "number"); var newDoc2 = { _id: "foo5000", @@ -711,6 +721,7 @@ couchTests.replicator_db = function(debug) { T(repDoc1.target === repDoc.target); T(repDoc1._replication_state === "completed", "replication document with bad replication id failed"); + T(typeof repDoc1._replication_state_time === "number"); T(typeof repDoc1._replication_id === "string"); T(repDoc1._replication_id !== "1234abc"); } @@ -730,6 +741,7 @@ couchTests.replicator_db = function(debug) { var repDoc1 = repDb.open(repDoc._id); T(repDoc1 !== null); T(repDoc1._replication_state === "error"); + T(typeof repDoc1._replication_state_time === "number"); T(typeof repDoc1._replication_id === "string"); } |