You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by wo...@apache.org on 2018/07/18 18:31:39 UTC

[couchdb] 01/03: Revert "Make loginUser wait for successful authentication"

This is an automated email from the ASF dual-hosted git repository.

wohali pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/couchdb.git

commit c94cc4cea335f7ef747fa97fd3b7df8a1ae902cf
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Wed Jul 18 12:23:36 2018 -0400

    Revert "Make loginUser wait for successful authentication"
    
    This reverts commit 6ffe0421ac524138a6b48fd010f2540631b83d16.
---
 test/javascript/tests/users_db_security.js | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index c55c764..4cc154e 100644
--- a/test/javascript/tests/users_db_security.js
+++ b/test/javascript/tests/users_db_security.js
@@ -32,13 +32,7 @@ couchTests.users_db_security = function(debug) {
     // the actual tests
     var username1 = username.replace(/[0-9]$/, "");
     var password = pws[username];
-    waitForSuccess(function() {
-      var req = CouchDB.login(username1, pws[username]);
-      if (req.ok) {
-        return true
-      }
-      throw({});
-    }, 'loginUser');
+    T(CouchDB.login(username1, pws[username]).ok);
   };
 
   var open_as = function(db, docId, username) {
@@ -113,6 +107,7 @@ couchTests.users_db_security = function(debug) {
 
     // jan's gonna be admin as he's the first user
     TEquals(true, usersDb.save(userDoc).ok, "should save document");
+    wait(5000);
     userDoc = open_as(usersDb, "org.couchdb.user:jchris", "jchris");
     TEquals(undefined, userDoc.password, "password field should be null 1");
     TEquals(scheme, userDoc.password_scheme, "password_scheme should be " + scheme);