[erlang-bugs] eunit timeout doesn't work properly
Richard Carlsson
carlsson.richard@REDACTED
Wed Feb 1 19:27:21 CET 2012
On 02/01/2012 03:13 PM, systemio systemio wrote:
> My function works about 7 seconds.
> i test my function via {timeout,100,[{setup,S,C,F}]} and always get timeout after 5 seconds.
> BUT if i test my function via {timeout,1,[{setup,S,C,F}]} i will get timeout after a second.
Yes, the {timeout,1,...} applies to the whole subset of tests, in this
case the setup and all the tests in it. The individual tests still get
their default timeout of 5 seconds. If you reduce the timeout for the
whole group to 1 second, then that will of course happen first and abort
all the tests in the group, while in the first case it's one of the
individual tests that times out first. Only when applied to a single
test does {timeout,T,...} change the timeout of the test itself.
I'm sorry that this is confusing. There should probably be a separate
way of modifying the default timeout for all individual tests.
/Richard
More information about the erlang-bugs
mailing list