aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-02-21 15:40:14 +0100
committerBjörn-Egil Dahlberg <[email protected]>2013-07-15 19:03:09 +0200
commit4e82946f3096faad3e804b31810e49e7e115b6ea (patch)
tree2096efc96f74c64b986cbfffe85d7b5ce5f92441
parentc6f452c340ad1749ce91c037a4820ea0feb0a644 (diff)
downloadotp-4e82946f3096faad3e804b31810e49e7e115b6ea.tar.gz
otp-4e82946f3096faad3e804b31810e49e7e115b6ea.tar.bz2
otp-4e82946f3096faad3e804b31810e49e7e115b6ea.zip
tests: Relax receive_SUITE time constraint
-rw-r--r--erts/emulator/test/receive_SUITE.erl11
1 files changed, 7 insertions, 4 deletions
diff --git a/erts/emulator/test/receive_SUITE.erl b/erts/emulator/test/receive_SUITE.erl
index b070e2b986..b8cf8a4abc 100644
--- a/erts/emulator/test/receive_SUITE.erl
+++ b/erts/emulator/test/receive_SUITE.erl
@@ -65,15 +65,18 @@ call_with_huge_message_queue(Config) when is_list(Config) ->
?line [self() ! {msg,N} || N <- lists:seq(1, 500000)],
erlang:garbage_collect(),
- ?line {NewTime,ok} = tc(fun() -> calls(10, Pid) end),
+ ?line {NewTime1,ok} = tc(fun() -> calls(10, Pid) end),
+ ?line {NewTime2,ok} = tc(fun() -> calls(10, Pid) end),
+
io:format("Time for empty message queue: ~p", [Time]),
- io:format("Time for huge message queue: ~p", [NewTime]),
+ io:format("Time1 for huge message queue: ~p", [NewTime1]),
+ io:format("Time2 for huge message queue: ~p", [NewTime2]),
- case (NewTime+1) / (Time+1) of
+ case hd(lists:sort([(NewTime1+1) / (Time+1), (NewTime2+1) / (Time+1)])) of
Q when Q < 10 ->
ok;
Q ->
- io:format("Q = ~p", [Q]),
+ io:format("Best Q = ~p", [Q]),
?line ?t:fail()
end,
ok.