diff options
author | Micael Karlberg <[email protected]> | 2019-06-25 12:57:03 +0200 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2019-06-25 13:49:05 +0200 |
commit | 6afac8386a0feefab34126997a064a631af8b40a (patch) | |
tree | fc8fc8c22b0bfff6ade6a666889e19617320e2eb /lib/megaco/test | |
parent | aa0cb115b78730dc5c72282df4f3d1114a157a58 (diff) | |
download | otp-6afac8386a0feefab34126997a064a631af8b40a.tar.gz otp-6afac8386a0feefab34126997a064a631af8b40a.tar.bz2 otp-6afac8386a0feefab34126997a064a631af8b40a.zip |
[megaco|test] Attempt to avoid race on slow VMs
Diffstat (limited to 'lib/megaco/test')
-rw-r--r-- | lib/megaco/test/megaco_examples_test.erl | 2 | ||||
-rw-r--r-- | lib/megaco/test/megaco_mib_test.erl | 4 | ||||
-rw-r--r-- | lib/megaco/test/megaco_test_lib.hrl | 3 | ||||
-rw-r--r-- | lib/megaco/test/megaco_timer_test.erl | 11 |
4 files changed, 7 insertions, 13 deletions
diff --git a/lib/megaco/test/megaco_examples_test.erl b/lib/megaco/test/megaco_examples_test.erl index 815e315c27..10ca0375f6 100644 --- a/lib/megaco/test/megaco_examples_test.erl +++ b/lib/megaco/test/megaco_examples_test.erl @@ -357,6 +357,6 @@ d(F, A) -> d(get(dbg), F, A). d(true, F, A) -> - io:format("DBG: ~s " ++ F ++ "~n", [?FT() | A]); + io:format("DBG: ~s " ++ F ++ "~n", [?FTS() | A]); d(_, _F, _A) -> ok. diff --git a/lib/megaco/test/megaco_mib_test.erl b/lib/megaco/test/megaco_mib_test.erl index a19e2acbd1..06ac7c08ed 100644 --- a/lib/megaco/test/megaco_mib_test.erl +++ b/lib/megaco/test/megaco_mib_test.erl @@ -1714,7 +1714,7 @@ print(Severity, Verbosity, P, F, A) -> print(printable(Severity,Verbosity), P, F, A). print(true, P, F, A) -> - io:format("~s~p:~s:~s: " ++ F ++ "~n", [P, self(), get(sname), ?FT() | A]); + io:format("~s~p:~s:~s: " ++ F ++ "~n", [P, self(), get(sname), ?FTS() | A]); print(_, _, _, _) -> ok. @@ -1723,7 +1723,7 @@ progress(F) -> progress(F, []). progress(F, A) -> - io:format(user, "~s " ++ F ++ "~n", [?FT()|A]). + io:format(user, "~s " ++ F ++ "~n", [?FTS()|A]). %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% diff --git a/lib/megaco/test/megaco_test_lib.hrl b/lib/megaco/test/megaco_test_lib.hrl index 19103c0a79..409f8d52e5 100644 --- a/lib/megaco/test/megaco_test_lib.hrl +++ b/lib/megaco/test/megaco_test_lib.hrl @@ -85,4 +85,5 @@ -define(HOURS(T), megaco_test_lib:hours(T)). -define(MINUTES(T), megaco_test_lib:minutes(T)). -define(SECONDS(T), megaco_test_lib:seconds(T)). --define(FT(), megaco_test_lib:formated_timestamp()). +-define(FTS(), megaco:format_timestamp(erlang:timestamp())). + diff --git a/lib/megaco/test/megaco_timer_test.erl b/lib/megaco/test/megaco_timer_test.erl index b60e8581cd..d3e8e27636 100644 --- a/lib/megaco/test/megaco_timer_test.erl +++ b/lib/megaco/test/megaco_timer_test.erl @@ -332,7 +332,7 @@ integer_timer_start_and_expire(Config) when is_list(Config) -> receive {timeout, Timeout} -> ok - after Timeout + 100 -> + after Timeout + 500 -> tmr_stop(Ref), error(no_timeout) end, @@ -443,13 +443,6 @@ print1(_, _, _, _) -> print(Prefix, F, A) -> io:format("*** [~s] ~s ~p ~s:~w ***" "~n " ++ F ++ "~n", - [formated_timestamp(), Prefix, self(), get(sname), get(tc) | A]). + [?FTS(), Prefix, self(), get(sname), get(tc) | A]). - - - -%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% - -formated_timestamp() -> - megaco:format_timestamp(os:timestamp()). |