From 3f6df2bea5d60264830705f9c663ec7b9286b85f Mon Sep 17 00:00:00 2001 From: Siri Hansen Date: Wed, 10 Oct 2012 12:08:55 +0200 Subject: [common_test] Extend valid interval for approximate timer values in tests When matching the result of tests of timetrap timeouts, the actual time is measured against the expected time, and an interval of +/- 2% was seen as correct result. This turned out to fail on some platforms and is now changed to 5%. --- lib/common_test/test/ct_test_support.erl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/common_test/test/ct_test_support.erl') diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl index e5e2e68fcb..7aca1fe235 100644 --- a/lib/common_test/test/ct_test_support.erl +++ b/lib/common_test/test/ct_test_support.erl @@ -1051,8 +1051,8 @@ result_match({SkipOrFail,{ErrorInd,{EMod,EFunc,{Why,'_'}}}}, true; result_match({failed,{timetrap_timeout,{'$approx',Num}}}, {failed,{timetrap_timeout,Value}}) -> - if Value >= trunc(Num-0.02*Num), - Value =< trunc(Num+0.02*Num) -> true; + if Value >= trunc(Num-0.05*Num), + Value =< trunc(Num+0.05*Num) -> true; true -> false end; result_match({user_timetrap_error,{Why,'_'}}, -- cgit v1.2.3