fix: keep v4.4 files sync with e4.4

This commit is contained in:
Shawn 2023-02-13 13:08:22 +08:00
parent f0b288ed3a
commit 05d14119fa
5 changed files with 17 additions and 7 deletions

View File

@ -146,7 +146,7 @@ exproto.listener.protoname.reuseaddr = true
## See: http://erlang.org/doc/man/ssl.html
##
## Value: String, seperated by ','
#exproto.listener.protoname.tls_versions = tlsv1.2,tlsv1.1,tlsv1
#exproto.listener.protoname.tls_versions = tls1.3,tlsv1.2,tlsv1.1
## Path to the file containing the user's private PEM-encoded key.
##

View File

@ -208,7 +208,7 @@ cli(["list"]) ->
lists:foreach(fun({Name, Active}) ->
emqx_ctl:print("Module(~s, description=~s, active=~s)~n",
[Name, Name:description(), Active])
end, emqx_modules:list());
end, list());
cli(["load", Name]) ->
case emqx_modules:load(list_to_atom(Name)) of

View File

@ -580,7 +580,10 @@ render_appup(App, File, Up, Down) ->
{error, enoent} when IsCheck ->
%% failed to read old file, exit
logerr("~s is missing", [File]),
set_invalid()
set_invalid();
{error, enoent} ->
logerr("~s is missing", [File]),
exit(1)
end.
do_render_appup(File, Up, Down) ->

View File

@ -60,6 +60,7 @@ t_get_env(_) ->
application:unset_env(emqx, undefined_key).
t_emqx_pubsub_api(_) ->
process_flag(trap_exit, true),
true = emqx:is_running(node()),
{ok, C} = emqtt:start_link([{host, "localhost"}, {clientid, "myclient"}]),
{ok, _} = emqtt:connect(C),

View File

@ -24,6 +24,7 @@
-export([start_slave/1,
start_slave/2,
stop_slave/1,
make_node_name/1,
wait_for_synced_routes/3
]).
@ -75,6 +76,7 @@ stop_slave(Node0) ->
erase_slave_mod(Node),
case rpc:call(Node, ekka, leave, []) of
ok -> ok;
{error, node_not_in_cluster} -> ok;
{badrpc, nodedown} -> ok
end,
case SlaveMod:stop(Node) of
@ -116,11 +118,15 @@ setup_node(Node, #{} = Opts) ->
end, LoadApps),
ok = rpc:call(Node, emqx_ct_helpers, start_apps, [StartApps, EnvHandler]),
case maps:get(no_join, Opts, false) of
true ->
case maps:get(join_to, Opts, node()) of
undefined ->
ok;
false ->
ok = rpc:call(Node, ekka, join, [node()])
JoinTo ->
%% assert
case rpc:call(Node, ekka, join, [JoinTo]) of
ok -> ok;
ignore -> ok
end
end,
%% Sanity check. Assert that `gen_rpc' is set up correctly: