diff options
author | Anders Svensson <[email protected]> | 2015-03-05 01:34:08 +0100 |
---|---|---|
committer | Anders Svensson <[email protected]> | 2015-03-05 01:34:08 +0100 |
commit | 5e5b22215e3f0a60b7afc2393b3ef68892360b07 (patch) | |
tree | 1c0a2c3b66c6af9eae4ba6587b911681a075ae64 /lib/diameter/test/diameter_transport_SUITE.erl | |
parent | a4df8f2e68ccef9936c5b43378a006099d81f801 (diff) | |
parent | eae8ecd1fd2ba33b1c81d0c19605047e2f317eda (diff) | |
download | otp-5e5b22215e3f0a60b7afc2393b3ef68892360b07.tar.gz otp-5e5b22215e3f0a60b7afc2393b3ef68892360b07.tar.bz2 otp-5e5b22215e3f0a60b7afc2393b3ef68892360b07.zip |
Merge branch 'anders/diameter/time/OTP-12439' into maint
* anders/diameter/time/OTP-12439:
Use new time api in test suites
Use new time api in implementation
Diffstat (limited to 'lib/diameter/test/diameter_transport_SUITE.erl')
-rw-r--r-- | lib/diameter/test/diameter_transport_SUITE.erl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/diameter/test/diameter_transport_SUITE.erl b/lib/diameter/test/diameter_transport_SUITE.erl index 84ab6cbdc4..f098851bea 100644 --- a/lib/diameter/test/diameter_transport_SUITE.erl +++ b/lib/diameter/test/diameter_transport_SUITE.erl @@ -53,7 +53,7 @@ %% Receive a message. -define(RECV(Pat, Ret), receive Pat -> Ret end). --define(RECV(Pat), ?RECV(Pat, now())). +-define(RECV(Pat), ?RECV(Pat, diameter_util:timestamp())). %% Sockets are opened on the loopback address. -define(ADDR, {127,0,0,1}). @@ -225,7 +225,7 @@ reconnect(_) -> || T <- [listen, connect]]). start_service(SvcName) -> - OH = io_lib:format("~p-~p-~p", tuple_to_list(now())), + OH = diameter_util:unique_string(), Opts = [{application, [{dictionary, diameter_gen_base_rfc6733}, {module, diameter_callback}]}, {'Origin-Host', OH}, @@ -335,7 +335,7 @@ make_msg() -> %% crypto:rand_bytes/1 isn't available on all platforms (since openssl %% isn't) so roll our own. rand_bytes(N) -> - random:seed(now()), + random:seed(diameter_util:seed()), rand_bytes(N, <<>>). rand_bytes(0, Bin) -> @@ -415,7 +415,7 @@ gen_accept(tcp, LSock) -> gen_send(sctp, Sock, Bin) -> {OS, _IS, Id} = getr(assoc), - {_, _, Us} = now(), + {_, _, Us} = diameter_util:timestamp(), gen_sctp:send(Sock, Id, Us rem OS, Bin); gen_send(tcp, Sock, Bin) -> gen_tcp:send(Sock, Bin). |