aboutsummaryrefslogtreecommitdiffstats
path: root/lib/kernel/test/erl_distribution_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-05-26 13:55:53 +0200
committerBjörn Gustavsson <[email protected]>2015-05-26 18:11:27 +0200
commit2065d20e00a5e5d1e526768c3be33d5ff86d2b53 (patch)
tree1ee4f7920ba5b28298e8ed286c381f1d844d2890 /lib/kernel/test/erl_distribution_SUITE.erl
parent032f106a1ebdbf310dd430b2169f55967e1d1a92 (diff)
downloadotp-2065d20e00a5e5d1e526768c3be33d5ff86d2b53.tar.gz
otp-2065d20e00a5e5d1e526768c3be33d5ff86d2b53.tar.bz2
otp-2065d20e00a5e5d1e526768c3be33d5ff86d2b53.zip
Eliminate use of erlang:now/0 for generating unique node names
Use erlang:unique_integer([positive]) when generating unique node names.
Diffstat (limited to 'lib/kernel/test/erl_distribution_SUITE.erl')
-rw-r--r--lib/kernel/test/erl_distribution_SUITE.erl20
1 files changed, 6 insertions, 14 deletions
diff --git a/lib/kernel/test/erl_distribution_SUITE.erl b/lib/kernel/test/erl_distribution_SUITE.erl
index 15c2adc957..5cd6da8f52 100644
--- a/lib/kernel/test/erl_distribution_SUITE.erl
+++ b/lib/kernel/test/erl_distribution_SUITE.erl
@@ -1267,16 +1267,12 @@ get_nodenames(N, T) ->
get_nodenames(0, _, Acc) ->
Acc;
get_nodenames(N, T, Acc) ->
- {A, B, C} = now(),
+ U = erlang:unique_integer([positive]),
get_nodenames(N-1, T, [list_to_atom(atom_to_list(T)
++ "-"
- ++ atom_to_list(?MODULE)
+ ++ ?MODULE_STRING
++ "-"
- ++ integer_to_list(A)
- ++ "-"
- ++ integer_to_list(B)
- ++ "-"
- ++ integer_to_list(C)) | Acc]).
+ ++ integer_to_list(U)) | Acc]).
get_numbered_nodenames(N, T) ->
get_numbered_nodenames(N, T, []).
@@ -1284,16 +1280,12 @@ get_numbered_nodenames(N, T) ->
get_numbered_nodenames(0, _, Acc) ->
Acc;
get_numbered_nodenames(N, T, Acc) ->
- {A, B, C} = now(),
+ U = erlang:unique_integer([positive]),
NL = [list_to_atom(atom_to_list(T) ++ integer_to_list(N)
++ "-"
- ++ atom_to_list(?MODULE)
- ++ "-"
- ++ integer_to_list(A)
- ++ "-"
- ++ integer_to_list(B)
+ ++ ?MODULE_STRING
++ "-"
- ++ integer_to_list(C)) | Acc],
+ ++ integer_to_list(U)) | Acc],
get_numbered_nodenames(N-1, T, NL).
wait_until(Fun) ->