couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wenda...@apache.org
Subject [1/6] git commit: updated refs/heads/master to 9dfddaa
Date Mon, 08 Apr 2013 23:33:51 GMT
Updated Branches:
  refs/heads/master e65d7b733 -> 9dfddaa7b


Ensure that waitForSuccess calls have return values.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/c43b84dc
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/c43b84dc
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/c43b84dc

Branch: refs/heads/master
Commit: c43b84dcc426dad888852eea078bbd96d796f928
Parents: e65d7b7
Author: Wendall Cada <wendallc@apache.org>
Authored: Fri Apr 5 11:38:20 2013 -0700
Committer: Wendall Cada <wendallc@apache.org>
Committed: Fri Apr 5 11:38:20 2013 -0700

----------------------------------------------------------------------
 share/www/script/test/changes.js |   13 ++++++++++++-
 share/www/script/test/oauth.js   |    1 +
 2 files changed, 13 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/c43b84dc/share/www/script/test/changes.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/changes.js b/share/www/script/test/changes.js
index d76c193..00944f7 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]);

http://git-wip-us.apache.org/repos/asf/couchdb/blob/c43b84dc/share/www/script/test/oauth.js
----------------------------------------------------------------------
diff --git a/share/www/script/test/oauth.js b/share/www/script/test/oauth.js
index 89d3779..9199cd0 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


Mime
View raw message