[erlang-questions] Ensuring a process is crashed with raise/3 in a Common_Test case

Jared Davison jared@REDACTED
Wed Aug 15 06:17:40 CEST 2018


Hi,

Could you please assist me in using common test.

I'm trying to ensure that a gen_statem:call/3 raises a {timeout, _} in a
common test case.

At first I tried a catch because I thought it would be a throw but it
catches nothing.

Digging into the gen_statem:call/3 code it appears that it uses
erlang:raise/3 which stops the execution of the process, so that makes
sense that catch does nothing.

I want to be sure that the process was stopped with the a particular
reason, and pass the test if it does.

Is this possible in Common Test?

Thanks

Jared
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180815/7e961e06/attachment.htm>


More information about the erlang-questions mailing list