Skip to content

Commit

Permalink
Merge branch 'bmk/megaco/20240626/test_tweaking' into maint
Browse files Browse the repository at this point in the history
  • Loading branch information
bmk committed Aug 9, 2024
2 parents 2b11534 + c9135e7 commit 872d5d0
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions lib/megaco/test/megaco_actions_SUITE.erl
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ req_and_rep([MgcNode, Mg1Node, Mg2Node],
%% Start the MGC and MGs
i("req_and_rep -> start the MGC"),
ET = [{Codec, EC, tcp}, {Codec, EC, udp}],
{ok, Mgc} = mgc_start(MgcNode, ET),
Mgc = start(fun() -> mgc_start(MgcNode, ET) end, mgc_start_timeout),

i("req_and_rep -> start and connect the MGs"),
MgConf0 = [{Mg1Node, "mg1", Codec, EC, tcp, ?MG_VERBOSITY},
Expand Down Expand Up @@ -402,7 +402,8 @@ connect_mg([{Node, Name, Codec, EC, Trans, Verb}|Mg], Acc) ->

connect_mg(Node, Name, Codec, EC, Trans, Verb) ->
Mid = {deviceName, Name},
{ok, Pid} = ?MG_START(Node, Mid, Codec, EC, Trans, Verb),
Pid = start(fun() -> ?MG_START(Node, Mid, Codec, EC, Trans, Verb) end,
mg_start_timeout),

{ok, _} = ?MG_EAR(Pid, true),

Expand Down Expand Up @@ -468,6 +469,19 @@ await_load_complete(MGs0) ->
end.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%% Start the 'unit' (MGC or MG).
%% If it fails for reason = timeout, we issue an skip.
start(Exec, Reason) ->
case Exec() of
{ok, Pid} ->
Pid;
{error, timeout} ->
?SKIP(Reason)
end.


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

make_node_name(Name) ->
Expand Down

0 comments on commit 872d5d0

Please sign in to comment.