diff options
author | Wendall Cada <wendallc@apache.org> | 2013-04-05 11:38:20 -0700 |
---|---|---|
committer | Wendall Cada <wendallc@apache.org> | 2013-04-05 11:38:20 -0700 |
commit | c43b84dcc426dad888852eea078bbd96d796f928 (patch) | |
tree | 2a7a8a2da4f545a4f156c989af919b56626b4617 | |
parent | e65d7b733cb31f59a5aac0d92ad23ebc21140593 (diff) | |
download | couchdb-c43b84dcc426dad888852eea078bbd96d796f928.tar.gz |
Ensure that waitForSuccess calls have return values.
-rw-r--r-- | share/www/script/test/changes.js | 13 | ||||
-rw-r--r-- | share/www/script/test/oauth.js | 1 |
2 files changed, 13 insertions, 1 deletions
diff --git a/share/www/script/test/changes.js b/share/www/script/test/changes.js index d76c19378..00944f73c 100644 --- a/share/www/script/test/changes.js +++ b/share/www/script/test/changes.js @@ -92,6 +92,7 @@ couchTests.changes = function(debug) { if (change2.seq != 2) { throw "bad seq, try again"; } + return true; }, "bar-only"); T(change1.seq == 1); @@ -112,6 +113,7 @@ couchTests.changes = function(debug) { if (change3.seq != 3) { throw "bad seq, try again"; } + return true; }); T(change3.seq == 3); @@ -131,6 +133,7 @@ couchTests.changes = function(debug) { if (str.charAt(str.length - 1) != "\n" || str.charAt(str.length - 2) != "\n") { throw("keep waiting"); } + return true; }, "heartbeat"); T(str.charAt(str.length - 1) == "\n"); @@ -152,8 +155,10 @@ couchTests.changes = function(debug) { source.addEventListener('message', sourceListener , false); waitForSuccess(function() { - if (results.length != 3) + if (results.length != 3) { throw "bad seq, try again"; + } + return true; }); source.removeEventListener('message', sourceListener, false); @@ -177,6 +182,7 @@ couchTests.changes = function(debug) { if (lines[5] != '"last_seq":3}') { throw("still waiting"); } + return true; }, "last_seq"); xhr = CouchDB.newXhr(); @@ -201,6 +207,7 @@ couchTests.changes = function(debug) { if (lines[3] != '"last_seq":4}') { throw("still waiting"); } + return true; }, "change_lines"); var change = parse_changes_line(lines[1]); @@ -233,6 +240,7 @@ couchTests.changes = function(debug) { if (lines[3] != '"last_seq":5}') { throw("still waiting"); } + return true; }, "change_lines"); var change = parse_changes_line(lines[1]); @@ -313,6 +321,7 @@ couchTests.changes = function(debug) { waitForSuccess(function() { resp = JSON.parse(xhr.responseText); + return true; }, "longpoll-since"); T(resp.last_seq == 10); @@ -337,6 +346,7 @@ couchTests.changes = function(debug) { if (xhr.readyState != 4) { throw("still waiting"); } + return true; }, "continuous-rusty"); lines = xhr.responseText.split("\n"); var good = false; @@ -529,6 +539,7 @@ couchTests.changes = function(debug) { if (xhr.readyState != 4) { throw("still waiting"); } + return true; }, "andmore-only"); var line = JSON.parse(xhr.responseText.split("\n")[0]); diff --git a/share/www/script/test/oauth.js b/share/www/script/test/oauth.js index 89d377944..9199cd07e 100644 --- a/share/www/script/test/oauth.js +++ b/share/www/script/test/oauth.js @@ -108,6 +108,7 @@ couchTests.oauth = function(debug) { if (xhr.responseText.indexOf("\"-pbkdf2-") != 0) { throw("still waiting"); } + return true; }, "wait-for-admin"); CouchDB.newUuids(2); // so we have one to make the salt |