You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ja...@apache.org on 2022/10/11 22:48:43 UTC

[couchdb-ioq] 03/03: Fix compiler warnings

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

jaydoane pushed a commit to branch quiet-ioq-config-tests
in repository https://gitbox.apache.org/repos/asf/couchdb-ioq.git

commit b8e02705b2618cd56b116ed6bfa6606666a4b80a
Author: Jay Doane <ja...@apache.org>
AuthorDate: Tue Oct 11 15:40:02 2022 -0700

    Fix compiler warnings
    
    - test/ioq_tests.erl:14:2: Warning: export_all flag enabled - all functions will be exported
    - src/ioq/src/ioq_server2.erl:928:52: Warning: variable 'RL' is unused
    - test/ioq_kv_tests.erl:125:14: Warning: random:uniform/1 is deprecated; use the 'rand' module instead
---
 src/ioq_server2.erl   | 2 +-
 test/ioq_kv_tests.erl | 2 +-
 test/ioq_tests.erl    | 1 -
 3 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/src/ioq_server2.erl b/src/ioq_server2.erl
index ea50346..be3bb40 100644
--- a/src/ioq_server2.erl
+++ b/src/ioq_server2.erl
@@ -925,7 +925,7 @@ test_auto_scale(#state{queue=HQ}=St0) ->
     {_, #ioq_request{init_priority=PriorityA2}} = hqueue:extract_max(HQ),
     Tests0 = [?_assertEqual(PriorityA, PriorityA2)],
     {_St, Tests} = lists:foldl(
-        fun(_N, {#state{iterations=I, resize_limit=RL}=StN0, TestsN}) ->
+        fun(_N, {#state{iterations=I}=StN0, TestsN}) ->
             ReqN = BaseReq#ioq_request{ref=make_ref()},
             ExpectedPriority = case I == 1 of
                 false -> PriorityA;
diff --git a/test/ioq_kv_tests.erl b/test/ioq_kv_tests.erl
index 48ee464..1477f46 100644
--- a/test/ioq_kv_tests.erl
+++ b/test/ioq_kv_tests.erl
@@ -122,7 +122,7 @@ random_key(#st{kvs=KVs}) ->
     Keys0 = dict:fetch_keys(KVs),
     Keys = lists:append(Keys0, [foo]),
     NumKeys = erlang:length(Keys),
-    KeyPos = random:uniform(NumKeys),
+    KeyPos = rand:uniform(NumKeys),
     lists:nth(KeyPos, Keys).
 
 cleanup() ->
diff --git a/test/ioq_tests.erl b/test/ioq_tests.erl
index 70eefc2..51bc0d3 100644
--- a/test/ioq_tests.erl
+++ b/test/ioq_tests.erl
@@ -11,7 +11,6 @@
 % the License.
 
 -module(ioq_tests).
--compile(export_all).
 
 -include_lib("eunit/include/eunit.hrl").
 -include_lib("ioq/include/ioq.hrl").