[erlang-questions] eunit timeout setting doesn't work?

Roger Lipscombe roger@REDACTED
Wed Jan 21 17:56:42 CET 2015

I have some smoke tests, implemented in the 'smoke' module, and I run
them as follows:

    Tests = [smoke],
    eunit:test(Tests, [verbose]).

And everything works. Except that when I point the tests at a remote
server, they start taking a lot longer to run, so eunit kills them
after 5 seconds.

I've tried:

    Tests = [smoke],
    eunit:test({timeout, 600, Tests}, [verbose]).

...and it doesn't seem to make any difference. What can I do extend
the allowed time for each of my tests to something more than 5

I found http://stackoverflow.com/q/1847004/8446, which suggests
wrapping each test in a {timeout, but I don't want to use that,
because I'm not using _assertWhatever in my tests. They're *cough* not
exactly "unit" tests...

Learn You Some Erlang suggests that

    all_test_() ->
        {timeout, 600, [fun first/0, fun second/0]}.

...ought to work. But it doesn't. I still get a timeout after approx 5 seconds.

What am I doing wrong?

More information about the erlang-questions mailing list