[erlang-questions] Error in Common Tests

Peter Andersson peppe@REDACTED
Fri May 1 10:13:12 CEST 2015


This is fixed now btw, and will be released soon.

Best,
Peter

On 2015-04-30 15:47, Roberto Ostinelli wrote:
> Thank you Peter! :)
>
> On Wed, Apr 29, 2015 at 3:27 PM, Peter Andersson <peppe@REDACTED
> <mailto:peppe@REDACTED>> wrote:
>
>
>     Roberto,
>
>     You won't get test case line info if it's the last line of
>     execution that causes the timetrap timeout. Because of tail call
>     elimination the {Suite,Testcase,Line} info is not saved on stack
>     unless there's a trailing expression. I.e.
>
>     tc(_) -> func_that_may_not_return().
>
>     will not generate test case line info if it fails, but
>
>     tc(_) -> func_that_may_not_return(), ok.
>
>     will.
>
>     That said, Common Test removes internal common_test and
>     test_server elements from the stack before printing the stack
>     trace to the log. This operation is too agressive and removes all
>     elements if no {Suite,Testcase,Line} tuple is found "to sync
>     with". Knowing it must be the last call in the test case causing
>     the timeout and knowing which internal function executed the test
>     case, I should be able to print relevant stack info to the log
>     even when a test case tuple is not present due to tail call
>     elimination. Fix is coming asap...
>
>     Best,
>     Peter
>
>     Ericsson AB, Erlang/OTP
>
>
>
>     On 2015-04-29 13:15, Roberto Ostinelli wrote:
>>     Loïc,
>>     Yes that did help me. It just stated {error,eoc} (i.e. no line of
>>     where this happened) but at least I could track it down to the issue.
>>
>>     Thank you.
>>     r.
>>
>>     On Wed, Apr 29, 2015 at 12:58 PM, Loïc Hoguin <essen@REDACTED
>>     <mailto:essen@REDACTED>> wrote:
>>
>>         Did you look inside the HTML logs that Common Test generates?
>>         They usually contain the complete error and stacktrace, while
>>         the console only gets partials.
>>
>>
>>         On 04/29/2015 01:54 PM, Roberto Ostinelli wrote:
>>
>>             Dear list,
>>             When running CT I have a test where I get:
>>
>>             - - - - - - - - - - - - - - - - - - - - - - - - - -
>>             Error detected: {'EXIT',{badmatch,{...}}}
>>             - - - - - - - - - - - - - - - - - - - - - - - - - -
>>
>>             No additional information. My application logs do not
>>             show any errors.
>>
>>             Weirdly enough, if I put a timer:sleep(10) somewhere in
>>             my code, this
>>             error does not show up anymore.
>>
>>             Thing is: how can I get CT to tell me the module / line
>>             where this error
>>             happens?
>>
>>             Thank you,
>>             r.
>>
>>
>>             _______________________________________________
>>             erlang-questions mailing list
>>             erlang-questions@REDACTED
>>             <mailto:erlang-questions@REDACTED>
>>             http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>>         -- 
>>         Loïc Hoguin
>>         http://ninenines.eu
>>
>>
>>
>>
>>     _______________________________________________
>>     erlang-questions mailing list
>>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>>     http://erlang.org/mailman/listinfo/erlang-questions
>
>
>     _______________________________________________
>     erlang-questions mailing list
>     erlang-questions@REDACTED <mailto:erlang-questions@REDACTED>
>     http://erlang.org/mailman/listinfo/erlang-questions
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150501/970cc68b/attachment.htm>


More information about the erlang-questions mailing list