aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test/node_container_SUITE.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2015-03-29 01:29:23 +0100
committerRickard Green <[email protected]>2015-05-06 15:58:32 +0200
commitf0d51083a6cda851ed60578a7679e20b1fe5678a (patch)
tree5a226fc49118adf9b42f4594c843082d9328a03f /erts/emulator/test/node_container_SUITE.erl
parente135070d4c7135228756e6a43dbdd638b565a499 (diff)
downloadotp-f0d51083a6cda851ed60578a7679e20b1fe5678a.tar.gz
otp-f0d51083a6cda851ed60578a7679e20b1fe5678a.tar.bz2
otp-f0d51083a6cda851ed60578a7679e20b1fe5678a.zip
Replace erlang:now() usage in emulator suite
Diffstat (limited to 'erts/emulator/test/node_container_SUITE.erl')
-rw-r--r--erts/emulator/test/node_container_SUITE.erl24
1 files changed, 8 insertions, 16 deletions
diff --git a/erts/emulator/test/node_container_SUITE.erl b/erts/emulator/test/node_container_SUITE.erl
index 9c1839811a..2f505893b4 100644
--- a/erts/emulator/test/node_container_SUITE.erl
+++ b/erts/emulator/test/node_container_SUITE.erl
@@ -1120,26 +1120,18 @@ wait_until(Pred) ->
false -> receive after 100 -> wait_until(Pred) end
end.
+get_nodefirstname_string() ->
+ atom_to_list(?MODULE)
+ ++ "-"
+ ++ integer_to_list(erlang:system_time(seconds))
+ ++ "-"
+ ++ integer_to_list(erlang:unique_integer([positive])).
get_nodefirstname() ->
- {A, B, C} = now(),
- list_to_atom(atom_to_list(?MODULE)
- ++ "-"
- ++ integer_to_list(A)
- ++ "-"
- ++ integer_to_list(B)
- ++ "-"
- ++ integer_to_list(C)).
+ list_to_atom(get_nodefirstname_string()).
get_nodename() ->
- {A, B, C} = now(),
- list_to_atom(atom_to_list(?MODULE)
- ++ "-"
- ++ integer_to_list(A)
- ++ "-"
- ++ integer_to_list(B)
- ++ "-"
- ++ integer_to_list(C)
+ list_to_atom(get_nodefirstname_string()
++ "@"
++ hostname()).