Skip to content

Commit

Permalink
Add run_spawn_forwards_errors testcase
Browse files Browse the repository at this point in the history
  • Loading branch information
arcusfelis committed Aug 3, 2023
1 parent 66c9344 commit 17c1607
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/cets_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ all() ->
unknown_cast_message_is_ignored_in_ack_process,
unknown_call_returns_error_from_ack_process,
code_change_returns_ok,
code_change_returns_ok_for_ack
code_change_returns_ok_for_ack,
run_spawn_forwards_errors
].

init_per_suite(Config) ->
Expand Down Expand Up @@ -956,6 +957,15 @@ code_change_returns_ok_for_ack(_Config) ->
ok = sys:change_code(AckPid, cets_ack, v2, []),
sys:resume(AckPid).

run_spawn_forwards_errors(_Config) ->
matched =
try
cets_long:run_spawn(#{}, fun() -> error(oops) end)
catch
error:oops ->
matched
end.

still_works(Pid) ->
pong = cets:ping(Pid),
%% The server works fine
Expand Down

0 comments on commit 17c1607

Please sign in to comment.