You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2015/12/12 17:01:35 UTC
[14/35] couchdb commit: updated refs/heads/2876-js-tests-merged to
6d9b2eb
since is opaque, not a string
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/624c60d7
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/624c60d7
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/624c60d7
Branch: refs/heads/2876-js-tests-merged
Commit: 624c60d77ec13e8432d1f3254876e79836f2aba7
Parents: 9cf1cb8
Author: sebastianro <se...@apache.org>
Authored: Mon Nov 2 18:40:08 2015 +0100
Committer: Jan Lehnardt <ja...@apache.org>
Committed: Sat Dec 12 15:25:09 2015 +0100
----------------------------------------------------------------------
test/javascript/tests/changes.js | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/624c60d7/test/javascript/tests/changes.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/changes.js b/test/javascript/tests/changes.js
index c65ff5c..ec490b8 100644
--- a/test/javascript/tests/changes.js
+++ b/test/javascript/tests/changes.js
@@ -669,7 +669,7 @@ couchTests.changes = function(debug) {
TEquals(2, resp.results.length);
// we can no longer pass a number into 'since' - but we have the 2nd last above - so we can use it (puh!)
- req = CouchDB.request("GET", "/" + db.name + "/_changes?style=all_docs&since=" + encodeURIComponent(JSON.stringify(resp.results[0].seq)));
+ req = CouchDB.request("GET", "/" + db.name + "/_changes?style=all_docs&since=" + encodeURIComponent(resp.results[0].seq));
resp = JSON.parse(req.responseText);
// (seq as before)
@@ -693,7 +693,7 @@ couchTests.changes = function(debug) {
// simulate an EventSource request with a Last-Event-ID header
req = CouchDB.request("GET", "/" + db_name + "/_changes?feed=eventsource&timeout=0&since=0",
- {"headers": {"Accept": "text/event-stream", "Last-Event-ID": JSON.stringify(JSON.parse(req.responseText).results[1].seq)}});
+ {"headers": {"Accept": "text/event-stream", "Last-Event-ID": JSON.parse(req.responseText).results[1].seq}});
// "parse" the eventsource response and collect only the "id: ..." lines
var changes = req.responseText.split('\n')
@@ -703,10 +703,10 @@ couchTests.changes = function(debug) {
.filter(function (el) { return (el[0] === "id"); })
// make sure we only got 2 changes, and they are update_seq=3 and update_seq=4
-// TODO: can't pass in new-style Sequence with Last-Event-ID header
-// T(changes.length === 2);
-// T(changes[0][1] === "3");
-// T(changes[1][1] === "4");
+ T(changes.length === 2);
+ // seq is different now
+ //T(changes[0][1] === "3");
+ //T(changes[1][1] === "4");
// COUCHDB-1923
// test w/ new temp DB