[erlang-questions] common test hiding errors?
Lukas Larsson
lukas.larsson@REDACTED
Wed Aug 10 10:09:36 CEST 2011
Hello!
Common Test detects any crashes which happen in the same process as the testcase is run in. If a crash happens in another process, it will not be detected unless you in your testcase check whether said process is alive or is linked to it. Could this be what is going wrong?
If you're still having difficulties, could you post a minimal example of what you are trying to do? It's difficult to guess what could be the problem without an example to look at.
Also if you want to have the SASL and error_logger output in your common test logs instead of redirecting them to a local file you might want to use the cth_log_redirect hook found here https://github.com/garazdawi/cth_tools.
Lukas
----- Original Message -----
From: "Joel Reymont" <joelr1@REDACTED>
To: "erlang-questions" <erlang-questions@REDACTED>
Sent: Wednesday, 10 August, 2011 12:07:56 AM
Subject: Re: [erlang-questions] common test hiding errors?
The following is what I see in logs/raw.log.
I know the game has crashed because the players are leaving and because showdown:winners did not return.
=ERROR REPORT==== 9-Aug-2011::22:59:35 ===
sitgo.erl:60 <0.258.0> hands ranked(<0.258.0>) call showdown:winners([{hand,<0.259.0>,1,[259,771],0,10,none,0}],[{0,[]}])
=ERROR REPORT==== 9-Aug-2011::22:59:35 ===
observer.erl:201 <0.275.0> Game 1: LEAVE -> 5
(<0.258.0>) call showdown:winners([{hand,<0.259.0>,1,[259,771],0,10,none,0}],[{0,[]}],[])
(<0.258.0>) call showdown:'-winners/3-fun-0-'({hand,<0.259.0>,1,[259,771],0,10,none,0},[])
=ERROR REPORT==== 9-Aug-2011::22:59:35 ===
observer.erl:201 <0.275.0> Game 1: LEAVE -> 4
=ERROR REPORT==== 9-Aug-2011::22:59:35 ===
observer.erl:201 <0.275.0> Game 1: LEAVE -> 3
Invoking showdown:winners at the Erlang prompt gives me an error.
Eshell V5.8.4 (abort with ^G)
1> showdown:winners([{hand,self(),1,[259,771],0,10,none,0}],[{0,[]}]).
** exception error: no function clause matching
gb_trees:is_defined(<0.31.0>,[])
in function lists:'-filter/2-lc$^0/1-0-'/2
in call from showdown:winners/3
How do I make Common Test show me this error during testing?
Thanks, Joel
--------------------------------------------------------------------------
- for hire: mac osx device driver ninja, kernel extensions and usb drivers
---------------------+------------+---------------------------------------
http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
---------------------+------------+---------------------------------------
_______________________________________________
erlang-questions mailing list
erlang-questions@REDACTED
http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list