diff options
author | Micael Karlberg <[email protected]> | 2019-07-10 19:03:04 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-07-17 11:47:49 +0200 |
commit | b4730a1efd315d7b4e410f34a2b66cb7bfd77889 (patch) | |
tree | eb7e3bd61e08c98b2577623db20a0640ffe87bf4 /lib/megaco/test/megaco_mreq_test.erl | |
parent | 4f377cd09e0e313bc2fe03c003db7f652934c618 (diff) | |
download | otp-b4730a1efd315d7b4e410f34a2b66cb7bfd77889.tar.gz otp-b4730a1efd315d7b4e410f34a2b66cb7bfd77889.tar.bz2 otp-b4730a1efd315d7b4e410f34a2b66cb7bfd77889.zip |
[megaco|test] erlang:now() and random cleanup
Removed all use of erlang:now() and the deprecated random module
from the test suite.
Diffstat (limited to 'lib/megaco/test/megaco_mreq_test.erl')
-rw-r--r-- | lib/megaco/test/megaco_mreq_test.erl | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/lib/megaco/test/megaco_mreq_test.erl b/lib/megaco/test/megaco_mreq_test.erl index e6a5ed3181..229141df4f 100644 --- a/lib/megaco/test/megaco_mreq_test.erl +++ b/lib/megaco/test/megaco_mreq_test.erl @@ -1,7 +1,7 @@ %% %% %CopyrightBegin% %% -%% Copyright Ericsson AB 2003-2016. All Rights Reserved. +%% Copyright Ericsson AB 2003-2019. All Rights Reserved. %% %% Licensed under the Apache License, Version 2.0 (the "License"); %% you may not use this file except in compliance with the License. @@ -456,7 +456,9 @@ print(Severity, Verbosity, P, F, A) -> print(printable(Severity,Verbosity), P, F, A). print(true, P, F, A) -> - io:format("~s~p:~s: " ++ F ++ "~n", [P, self(), get(sname) | A]); + io:format("*** [~s] ~s ~p ~s ***" + "~n " ++ F ++ "~n", + [?FTS(), P, self(), get(sname) | A]); print(_, _, _, _) -> ok. @@ -464,11 +466,10 @@ print(_, _, _, _) -> %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% random_init() -> - {A,B,C} = now(), - random:seed(A,B,C). + ok. random() -> - 10 * random:uniform(50). + 10 * rand:uniform(50). apply_load_timer() -> erlang:send_after(random(), self(), apply_load_timeout). |