test(peer): increase init and startup timeout for peer nodes
Attempt to stabilize tests that use cluster nodes.
This commit is contained in:
parent
0e5a22f500
commit
8b5a717a1f
|
@ -660,6 +660,7 @@ start_slave(Name, Opts) when is_list(Opts) ->
|
|||
start_slave(Name, Opts) when is_map(Opts) ->
|
||||
SlaveMod = maps:get(peer_mod, Opts, ct_slave),
|
||||
Node = node_name(Name),
|
||||
put_peer_mod(Node, SlaveMod),
|
||||
DoStart =
|
||||
fun() ->
|
||||
case SlaveMod of
|
||||
|
@ -669,8 +670,8 @@ start_slave(Name, Opts) when is_map(Opts) ->
|
|||
[
|
||||
{kill_if_fail, true},
|
||||
{monitor_master, true},
|
||||
{init_timeout, 10000},
|
||||
{startup_timeout, 10000},
|
||||
{init_timeout, 20_000},
|
||||
{startup_timeout, 20_000},
|
||||
{erl_flags, erl_flags()}
|
||||
]
|
||||
);
|
||||
|
@ -687,7 +688,6 @@ start_slave(Name, Opts) when is_map(Opts) ->
|
|||
throw(Other)
|
||||
end,
|
||||
pong = net_adm:ping(Node),
|
||||
put_peer_mod(Node, SlaveMod),
|
||||
setup_node(Node, Opts),
|
||||
ok = snabbkaffe:forward_trace(Node),
|
||||
Node.
|
||||
|
|
|
@ -388,7 +388,9 @@ end_per_testcase(_Testcase, Config) ->
|
|||
maps:values(ProducersMapping)
|
||||
),
|
||||
ok = wolff:stop_and_delete_supervised_client(KafkaProducerClientId),
|
||||
emqx_common_test_helpers:call_janitor(30_000),
|
||||
%% in CI, apparently this needs more time since the
|
||||
%% machines struggle with all the containers running...
|
||||
emqx_common_test_helpers:call_janitor(60_000),
|
||||
ok = snabbkaffe:stop(),
|
||||
ok
|
||||
end.
|
||||
|
@ -1664,7 +1666,7 @@ t_cluster_group(Config) ->
|
|||
|| {Name, Opts} <- Cluster
|
||||
],
|
||||
on_exit(fun() ->
|
||||
lists:foreach(
|
||||
emqx_misc:pmap(
|
||||
fun(N) ->
|
||||
ct:pal("stopping ~p", [N]),
|
||||
ok = emqx_common_test_helpers:stop_slave(N)
|
||||
|
@ -1875,7 +1877,7 @@ t_cluster_node_down(Config) ->
|
|||
Cluster
|
||||
),
|
||||
on_exit(fun() ->
|
||||
lists:foreach(
|
||||
emqx_misc:pmap(
|
||||
fun(N) ->
|
||||
ct:pal("stopping ~p", [N]),
|
||||
ok = emqx_common_test_helpers:stop_slave(N)
|
||||
|
@ -1894,11 +1896,15 @@ t_cluster_node_down(Config) ->
|
|||
{ok, _} = snabbkaffe:receive_events(SRef0),
|
||||
lists:foreach(
|
||||
fun(N) ->
|
||||
?retry(
|
||||
_Sleep1 = 100,
|
||||
_Attempts1 = 50,
|
||||
?assertMatch(
|
||||
{ok, _},
|
||||
erpc:call(N, emqx_bridge, lookup, [BridgeId]),
|
||||
#{node => N}
|
||||
)
|
||||
)
|
||||
end,
|
||||
Nodes
|
||||
),
|
||||
|
|
Loading…
Reference in New Issue