aboutsummaryrefslogtreecommitdiffstats
path: root/lib/common_test/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-12-10 15:10:27 +0100
committerBjörn Gustavsson <[email protected]>2015-12-14 15:44:42 +0100
commit38e8ab99454f69acab55e5bcb575ed60a8b72c2e (patch)
tree9d91b9ec5ee2927c04acaa7104d9cd4927352382 /lib/common_test/test
parent389834628ef9b199d6ce1ab721a20737acb014d4 (diff)
downloadotp-38e8ab99454f69acab55e5bcb575ed60a8b72c2e.tar.gz
otp-38e8ab99454f69acab55e5bcb575ed60a8b72c2e.tar.bz2
otp-38e8ab99454f69acab55e5bcb575ed60a8b72c2e.zip
common_test tests: Replace 'random' with 'rand'
Diffstat (limited to 'lib/common_test/test')
-rw-r--r--lib/common_test/test/ct_master_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_test_support.erl8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/common_test/test/ct_master_SUITE.erl b/lib/common_test/test/ct_master_SUITE.erl
index 15b49c67c0..55837352e2 100644
--- a/lib/common_test/test/ct_master_SUITE.erl
+++ b/lib/common_test/test/ct_master_SUITE.erl
@@ -135,7 +135,7 @@ make_spec(DataDir, FileName, NodeNames, Suites, Config) ->
C = lists:map(
fun(NodeName) ->
- Rnd = random:uniform(2),
+ Rnd = rand:uniform(2),
if Rnd == 1->
{config,NodeName,filename:join(DataDir,
"master/config.txt")};
diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl
index 248ec6c4df..4a47d345e9 100644
--- a/lib/common_test/test/ct_test_support.erl
+++ b/lib/common_test/test/ct_test_support.erl
@@ -414,14 +414,14 @@ ct_rpc({M,F,A}, Config) ->
%%%-----------------------------------------------------------------
%%% random_error/1
random_error(Config) when is_list(Config) ->
- random:seed(os:timestamp()),
+ rand:seed(exsplus),
Gen = fun(0,_) -> ok; (N,Fun) -> Fun(N-1, Fun) end,
- Gen(random:uniform(100), Gen),
+ Gen(rand:uniform(100), Gen),
ErrorTypes = ['BADMATCH','BADARG','CASE_CLAUSE','FUNCTION_CLAUSE',
'EXIT','THROW','UNDEF'],
- Type = lists:nth(random:uniform(length(ErrorTypes)), ErrorTypes),
- Where = case random:uniform(2) of
+ Type = lists:nth(rand:uniform(length(ErrorTypes)), ErrorTypes),
+ Where = case rand:uniform(2) of
1 ->
io:format("ct_test_support *returning* error of type ~w",
[Type]),