Browse Source

fix(test): flaky emqx_connector_api_SUITE test case.

zhongwencool 4 years ago
parent
commit
0ec111d4e0

+ 1 - 1
apps/emqx_connector/test/emqx_connector_api_SUITE.erl

@@ -420,8 +420,8 @@ t_mqtt_conn_update2(_) ->
     %% we fix the 'server' parameter to a normal one, it should work
     %% we fix the 'server' parameter to a normal one, it should work
     {ok, 200, _} = request(put, uri(["connectors", ConnctorID]),
     {ok, 200, _} = request(put, uri(["connectors", ConnctorID]),
                                  ?MQTT_CONNECOTR2(<<"127.0.0.1:1883">>)),
                                  ?MQTT_CONNECOTR2(<<"127.0.0.1:1883">>)),
-    {ok, 200, BridgeStr} = request(get, uri(["bridges", BridgeIDEgress]), []),
     wait_for_resource_ready(BridgeIDEgress, 5),
     wait_for_resource_ready(BridgeIDEgress, 5),
+    {ok, 200, BridgeStr} = request(get, uri(["bridges", BridgeIDEgress]), []),
     ?assertMatch(#{ <<"id">> := BridgeIDEgress
     ?assertMatch(#{ <<"id">> := BridgeIDEgress
                   , <<"status">> := <<"connected">>
                   , <<"status">> := <<"connected">>
                   }, jsx:decode(BridgeStr)),
                   }, jsx:decode(BridgeStr)),

+ 1 - 1
apps/emqx_management/src/emqx_mgmt_api_trace.erl

@@ -339,7 +339,7 @@ cluster_call(Mod, Fun, Args, Timeout) ->
     Nodes = mria_mnesia:running_nodes(),
     Nodes = mria_mnesia:running_nodes(),
     {GoodRes, BadNodes} = rpc:multicall(Nodes, Mod, Fun, Args, Timeout),
     {GoodRes, BadNodes} = rpc:multicall(Nodes, Mod, Fun, Args, Timeout),
     BadNodes =/= [] andalso
     BadNodes =/= [] andalso
-        ?SLOG(error, #{msg => "rpc call failed", bad_nodes => BadNodes, mfa => {Mod, Fun, Args}}),
+        ?SLOG(error, #{msg => "rpc_call_failed", bad_nodes => BadNodes, mfa => {Mod, Fun, Args}}),
     GoodRes.
     GoodRes.
 
 
 stream_log_file(get, #{bindings := #{name := Name}, query_string := Query}) ->
 stream_log_file(get, #{bindings := #{name := Name}, query_string := Query}) ->