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 2020/10/21 18:52:44 UTC
[couchdb] tag archive/bcrypt created (now 16099ab)
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a change to tag archive/bcrypt
in repository https://gitbox.apache.org/repos/asf/couchdb.git.
at 16099ab (commit)
This tag includes the following new commits:
new e41996b Replace resource expensive bcrypt test with shorter version (#1231)
new 2c6e322 Make loginUser wait for successful authentication
new 16099ab Force use of SMP enabled BEAM VM, fixes #1296
The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[couchdb] 02/03: Make loginUser wait for successful authentication
Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to tag archive/bcrypt
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 2c6e322d38f28af806bc83da6349c0941c8ee39d
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Thu Mar 29 13:44:29 2018 -0300
Make loginUser wait for successful authentication
---
test/javascript/tests/users_db_security.js | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/test/javascript/tests/users_db_security.js b/test/javascript/tests/users_db_security.js
index 536585a..fd59e01 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);
[couchdb] 01/03: Replace resource expensive bcrypt test with
shorter version (#1231)
Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to tag archive/bcrypt
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit e41996b63c8d4261d18730aab2dd91a7793e89ba
Author: Eric Avdey <ei...@eiri.ca>
AuthorDate: Fri Mar 23 15:43:03 2018 -0300
Replace resource expensive bcrypt test with shorter version (#1231)
* Fix the tests
* Replace resource expensive bcrypt test with shorter version
* Add tests descriptions
---
src/couch/test/couch_passwords_tests.erl | 34 ++++++++++++++++----------------
1 file changed, 17 insertions(+), 17 deletions(-)
diff --git a/src/couch/test/couch_passwords_tests.erl b/src/couch/test/couch_passwords_tests.erl
index c624dba..a566273 100644
--- a/src/couch/test/couch_passwords_tests.erl
+++ b/src/couch/test/couch_passwords_tests.erl
@@ -53,24 +53,24 @@ pbkdf2_test_()->
)}}]}.
-
-setup() ->
- test_util:start(?MODULE, [bcrypt]).
-
-teardown(Ctx)->
- test_util:stop(Ctx).
-
bcrypt_test_() ->
{
"Bcrypt",
{
- foreach,
- fun setup/0, fun teardown/1,
+ setup,
+ fun() ->
+ test_util:start_applications([bcrypt])
+ end,
+ fun test_util:stop_applications/1,
[
- {timeout, 1, fun bcrypt_logRounds_4/0},
- {timeout, 5, fun bcrypt_logRounds_12/0},
- {timeout, 180, fun bcrypt_logRounds_18/0},
- {timeout, 5, fun bcrypt_null_byte/0}
+ {"Log rounds: 4",
+ {timeout, 1, fun bcrypt_logRounds_4/0}},
+ {"Log rounds: 5",
+ {timeout, 1, fun bcrypt_logRounds_5/0}},
+ {"Log rounds: 12",
+ {timeout, 5, fun bcrypt_logRounds_12/0}},
+ {"Null byte",
+ {timeout, 5, fun bcrypt_null_byte/0}}
]
}
@@ -79,16 +79,16 @@ bcrypt_test_() ->
bcrypt_logRounds_4() ->
bcrypt_assert_equal(<<"password">>, 4).
+bcrypt_logRounds_5() ->
+ bcrypt_assert_equal(<<"password">>, 5).
+
bcrypt_logRounds_12() ->
bcrypt_assert_equal(<<"password">>, 12).
-bcrypt_logRounds_18() ->
- bcrypt_assert_equal(<<"password">>, 18).
-
bcrypt_null_byte() ->
bcrypt_assert_equal(<<"passw\0rd">>, 12).
bcrypt_assert_equal(Password, Rounds) when is_integer(Rounds) ->
HashPass = couch_passwords:bcrypt(Password, Rounds),
ReHashPass = couch_passwords:bcrypt(Password, HashPass),
- ?_assertEqual(HashPass, ReHashPass).
+ ?assertEqual(HashPass, ReHashPass).
[couchdb] 03/03: Force use of SMP enabled BEAM VM, fixes #1296
Posted by wo...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
wohali pushed a commit to tag archive/bcrypt
in repository https://gitbox.apache.org/repos/asf/couchdb.git
commit 16099ab204ed492824b9ff9a54344c886e04cb81
Author: Joan Touzet <jo...@atypical.net>
AuthorDate: Sun Apr 29 16:00:18 2018 -0400
Force use of SMP enabled BEAM VM, fixes #1296
---
rel/overlay/etc/vm.args | 3 +++
1 file changed, 3 insertions(+)
diff --git a/rel/overlay/etc/vm.args b/rel/overlay/etc/vm.args
index acb4571..46f3063 100644
--- a/rel/overlay/etc/vm.args
+++ b/rel/overlay/etc/vm.args
@@ -45,3 +45,6 @@
# Comment this line out to enable the interactive Erlang shell on startup
+Bd -noinput
+
+# Force use of the smp scheduler, fixes #1296
+-smp enable