File 1261-httpc-Replaced-deprecated-module-random-with-recomme.patch of Package erlang
From be9c40c614a11952652cb488d730a5a91656d4ec Mon Sep 17 00:00:00 2001
From: Hans Nilsson <hans@erlang.org>
Date: Tue, 7 Jun 2016 17:34:38 +0200
Subject: [PATCH] httpc: Replaced deprecated module random with recommended
module rand in httpc_SUITE
---
lib/inets/test/httpc_SUITE.erl | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index 4277292..932567e 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -2080,7 +2080,7 @@ run_clients(NumClients, ServerPort, SeqNumServer) ->
end
end),
MRef = erlang:monitor(process, Pid),
- timer:sleep(10 + random:uniform(1334)),
+ timer:sleep(10 + rand:uniform(1334)),
{Id, Pid, MRef}
end,
lists:seq(1, NumClients)).
@@ -2169,7 +2169,7 @@ slowly_send_response(CSock, Answer) ->
[length(Answer), Answer])),
lists:foreach(
fun(Char) ->
- timer:sleep(random:uniform(500)),
+ timer:sleep(rand:uniform(500)),
gen_tcp:send(CSock, <<Char>>)
end,
Response).
@@ -2189,9 +2189,8 @@ parse_connection_type(Request) ->
set_random_seed() ->
Unique = erlang:unique_integer(),
-
A = erlang:phash2([make_ref(), self(), Unique]),
- random:seed(A, A, A).
+ rand:seed(exsplus, {A, A, A}).
otp_8739(doc) ->
--
2.1.4