You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@couchdb.apache.org by GitBox <gi...@apache.org> on 2018/03/29 17:37:40 UTC

[GitHub] janl closed pull request #1258: Make loginUser wait for successful authentication

janl closed pull request #1258: Make loginUser wait for successful authentication
URL: https://github.com/apache/couchdb/pull/1258
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index 4cc154edd8..c55c764344 100644
--- a/test/javascript/tests/users_db_security.js
+++ b/test/javascript/tests/users_db_security.js
@@ -32,7 +32,13 @@ couchTests.users_db_security = function(debug) {
     // the actual tests
     var username1 = username.replace(/[0-9]$/, "");
     var password = pws[username];
-    T(CouchDB.login(username1, pws[username]).ok);
+    waitForSuccess(function() {
+      var req = CouchDB.login(username1, pws[username]);
+      if (req.ok) {
+        return true
+      }
+      throw({});
+    }, 'loginUser');
   };
 
   var open_as = function(db, docId, username) {
@@ -107,7 +113,6 @@ 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);


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services