Просмотр исходного кода

test: fix peer node stop and plugin SUITE typo

Zaiming (Stone) Shi 2 лет назад
Родитель
Сommit
cf72c04fdd

+ 1 - 7
apps/emqx/test/emqx_common_test_helpers.erl

@@ -780,13 +780,7 @@ start_slave(Name, Opts) when is_map(Opts) ->
 %% Node stopping
 stop_slave(Node0) ->
     Node = node_name(Node0),
-    SlaveMod = get_peer_mod(Node),
-    erase_peer_mod(Node),
-    case SlaveMod:stop(Node) of
-        ok -> ok;
-        {ok, _} -> ok;
-        {error, not_started, _} -> ok
-    end.
+    emqx_cth_peer:stop(Node).
 
 %% EPMD starting
 start_epmd() ->

+ 1 - 1
apps/emqx_plugins/test/emqx_plugins_SUITE.erl

@@ -750,7 +750,7 @@ group_t_copy_plugin_to_a_new_node_single_node({init, Config}) ->
         | Config
     ];
 group_t_copy_plugin_to_a_new_node_single_node({'end', Config}) ->
-    CopyToNode = proplists:get_value(copy_to_node, Config),
+    CopyToNode = proplists:get_value(copy_to_node_name, Config),
     ok = emqx_common_test_helpers:stop_slave(CopyToNode),
     ok = file:del_dir_r(proplists:get_value(to_install_dir, Config)),
     ok;