|
|
| Author |
Message |
|
| Guest |
Posted: Thu Nov 19, 2009 8:55 pm |
|
|
|
Guest
|
eunit 2.1.3, OTP R13B02-1
Problem description: In case when one of the functions within a group of
tests throws an error, timeout resets to default one ( in my case 5 secs):
-module(test).
-include_lib("eunit/include/eunit.hrl").
slow_test_() ->
{timeout, 300,
[?_assertEqual(ok, test1()),
?_assertEqual(ok, test2())
]}.
test1() ->
throw(error),
ok.
test2() ->
timer:sleep(6000),
ok.
Execution:
eunit:test(test).
test:11: slow_test_...*failed*
::throw:error
in function test:test1/0
in call from test:'-slow_test_/0-fun-0-'/1
output:<<"Timeout set in eunit= 5000 %% mine output in eunit_proc.erl
module set_timeout/2 method
">>
test:12: slow_test_...*timed out*
In this test, despite the timeout of the group set to 300 sec, after test1
throwing error, timeout sets to 5 sec. I think this is wrong. (if you remove
throw(error) from test1 function, you'll get successfully passed test2).
--
Best regards,
Alex Kutsko,
Post received from mailinglist |
|
|
| Back to top |
|
|
|
All times are GMT
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You cannot download files in this forum
|
|
|