You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ro...@apache.org on 2024/01/25 14:58:23 UTC

(couchdb-fast-pbkdf2) 08/40: Remove unnecessary test, doesnt really add any value

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

ronny pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/couchdb-fast-pbkdf2.git

commit 117590d78accd8552550f8c90948b3e93091630f
Author: Nelson Vides <vi...@gmail.com>
AuthorDate: Tue Mar 9 22:06:12 2021 +0100

    Remove unnecessary test, doesnt really add any value
---
 rebar.config          |  3 +--
 test/pbkdf2_SUITE.erl | 22 ++--------------------
 2 files changed, 3 insertions(+), 22 deletions(-)

diff --git a/rebar.config b/rebar.config
index d66aa05..757f84a 100644
--- a/rebar.config
+++ b/rebar.config
@@ -2,9 +2,8 @@
 
 {profiles, [
   {test, [
-    {erl_opts, [debug_info, {d, 'STATISTICS'}]},
+    {erl_opts, []},
     {deps, [
-      {statistics, {git, "https://github.com/NelsonVides/statistics.git", {branch, "master"}}},
       {base16, "1.0.0"},
       {proper, "1.3.0"}
      ]},
diff --git a/test/pbkdf2_SUITE.erl b/test/pbkdf2_SUITE.erl
index 1521711..f08ed1c 100644
--- a/test/pbkdf2_SUITE.erl
+++ b/test/pbkdf2_SUITE.erl
@@ -16,8 +16,7 @@
          erlang_and_nif_are_equivalent_sha224/1,
          erlang_and_nif_are_equivalent_sha256/1,
          erlang_and_nif_are_equivalent_sha384/1,
-         erlang_and_nif_are_equivalent_sha512/1,
-         realtime_test/1
+         erlang_and_nif_are_equivalent_sha512/1
         ]).
 -export([
          test_vector_sha1_1/1,
@@ -40,8 +39,7 @@
 all() ->
     [
      {group, equivalents},
-     {group, test_vectors},
-     realtime_test
+     {group, test_vectors}
     ].
 
 groups() ->
@@ -186,19 +184,3 @@ test_vector_sha256_6(_Config) ->
     {P,S,It,DkLen,Result} = {<<"pass\0word">>, <<"sa\0lt">>, 4096, 16,
      base16:decode(<<"89b69d0516f829893c696226650a8687">>)},
     ?assertEqual(Result, fast_pbkdf2:pbkdf2(sha256, P, S, It, DkLen)).
-
-
--ifdef(STATISTICS).
-realtime_test(_Config) ->
-    % Allocate two large binaries
-    A = crypto:strong_rand_bytes(64),
-    B = crypto:strong_rand_bytes(64),
-    Fun = fun() ->
-                  fast_pbkdf2:pbkdf2(512, A, B, 10000)
-          end,
-    #{mean := AverageJitter} = stats_latency:realtime_latency_on_load(Fun, 20, 5000),
-    ?assert(AverageJitter < 50).
--else.
-realtime_test(_Config) ->
-    ok.
--endif.