-
Notifications
You must be signed in to change notification settings - Fork 405
Replaced calls to random by rand
#414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Deprecated since Erlang/OTP 19. Link: https://www.erlang.org/doc/deprecations.html#functions-deprecated-in-otp-19 Signed-off-by: Ariel Otilibili <[email protected]>
Deprecated since Erlang/OTP 19. Link: https://www.erlang.org/doc/deprecations.html#functions-deprecated-in-otp-19 Signed-off-by: Ariel Otilibili <[email protected]>
Deprecated since Erlang/OTP 19. Link: https://www.erlang.org/doc/deprecations.html#functions-deprecated-in-otp-19 Signed-off-by: Ariel Otilibili <[email protected]>
Deprecated since Erlang/OTP 19. Link: https://www.erlang.org/doc/deprecations.html#functions-deprecated-in-otp-19 Signed-off-by: Ariel Otilibili <[email protected]>
ba33b56 to
0b35269
Compare
|
Look good. |
Thanks, @prefiks; I'll push other PRs in coming days; for clearing out warnings in OTP 23. |
|
The calls to rand:seed seem wrong, see https://www.erlang.org/doc/apps/stdlib/rand.html#seed/2 There's no seed/3 accepting a state without an algorithm, as implied by the merged code, which results in runtime failures. At a first glance, when using the rand module instead of random, some seed calls appear gratuitous. |
| {timeout,Ref2,end_thinktime} -> ok | ||
| end, | ||
| random:seed(), % reinit seed for others tests | ||
| rand:seed(), % reinit seed for others tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that even needed? The rand module is autoseeded...
| %%%=================================================================== | ||
| gen_accept_key() -> | ||
| random:seed(erlang:now()), | ||
| rand:seed(erlang:now()), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What's the point of trying to seed here? crypto:strong_rand_bytes/1 takes care of that, no?
PR processone#414 fixed compilation warnings but broke tsung at runtime. See https://www.erlang.org/docs/25/man/rand#seed-2
PR processone#414 fixed compilation warnings but broke tsung at runtime. See https://www.erlang.org/docs/25/man/rand#seed-2
|
I am just reading your feedback, @VlkrS; it is much appreciated.
I will then push the fixes. |
Hello committers,
Thanks for maintaining this project. I would like to bring back to the community, and also to improve my Erlang skills.
Here is the first of few PRs on clearing out compilation warnings. For this one,
randomis deprecated since Erlang/OTP 19.Thank you,