[erlang-questions] test_server and timetraps

Peter Andersson peppe@REDACTED
Mon Dec 7 15:18:17 CET 2009


Thanks for poiniting this out. I agree it has to be changed, or at least
properly documented. Will do.

  /Peter

Erlang/OTP, Ericsson AB

Jayson Vantuyl wrote:
> Just to save anybody else the trouble, test_server has some... interesting behavior.
>
> I had tests with timeouts of 5 seconds that would run for 15 and still not be killed.  This seemed odd, so I checked it out.
>
> Apparently, when certain options are turned on, the test_server will scale up your timeouts.  Buried deep within the bowels of test_server, there is a sprinkling of code that determines a "multiplier" for your timetraps.  Apparently, it considers running under code coverage reason to scale your timeout by a factor of 10!  This was definitely a surprise.  Although, I admit that the fact that running on VXworks increases timeouts by another factor 5 was good for a laugh.
>
> I decided to mail the list so that this would be on the webs for people to find.
>
> It turns out that it is documented in test_server, but not in common_test.  Can somebody document this in common_test, so that people don't wonder why their timetraps seemingly never kick in?  The built in testing / debugging / tracing under Erlang is absolutely wonderful, but it's so woefully documented that I'm surprised that anybody uses it.  Let's just say a 12 minute timeout becoming a two hour timeout is not "expected behavior".  :(
>
>   



More information about the erlang-questions mailing list