Преглед изворни кода

Merge pull request #13039 from lafirest/fix/rocket_key

fix(rocketmq): fix a typo and a RocketMQ encoding error
lafirest пре 1 година
родитељ
комит
faf3492e58

+ 1 - 1
apps/emqx/test/emqx_channel_SUITE.erl

@@ -580,7 +580,7 @@ t_handle_out_publish_1(_) ->
     {ok, {outgoing, [?PUBLISH_PACKET(?QOS_1, <<"t">>, 1, <<"payload">>)]}, _Chan} =
         emqx_channel:handle_out(publish, [{1, Msg}], channel()).
 
-t_handle_out_connack_sucess(_) ->
+t_handle_out_connack_success(_) ->
     {ok, [{event, connected}, {connack, ?CONNACK_PACKET(?RC_SUCCESS, 0, _)}], Channel} =
         emqx_channel:handle_out(connack, {?RC_SUCCESS, 0, #{}}, channel()),
     ?assertEqual(connected, emqx_channel:info(conn_state, Channel)).

+ 1 - 1
apps/emqx/test/emqx_config_SUITE.erl

@@ -382,7 +382,7 @@ t_init_zone_with_global_defaults(Config) when is_list(Config) ->
     %% when put zones with global default with emqx_config:put/1
     GlobalDefaults = zone_global_defaults(),
     AllConf = maps:put(zones, Zones, GlobalDefaults),
-    %% Then put sucess
+    %% Then put success
     ?assertEqual(ok, emqx_config:put(AllConf)),
     %% Then GlobalDefaults are set
     ?assertEqual(GlobalDefaults, maps:with(maps:keys(GlobalDefaults), emqx_config:get([]))),

+ 1 - 1
apps/emqx_bridge_kafka/src/emqx_bridge_kafka_impl_producer.erl

@@ -503,7 +503,7 @@ on_get_status(
 ) ->
     %% Note: we must avoid returning `?status_disconnected' here if the connector ever was
     %% connected.  If the connector ever connected, wolff producers might have been
-    %% sucessfully started, and returning `?status_disconnected' will make resource
+    %% successfully started, and returning `?status_disconnected' will make resource
     %% manager try to restart the producers / connector, thus potentially dropping data
     %% held in wolff producer's replayq.
     case check_client_connectivity(ClientId) of

+ 1 - 1
apps/emqx_bridge_rocketmq/src/emqx_bridge_rocketmq_connector.erl

@@ -347,7 +347,7 @@ parse_dispatch_strategy(#{strategy := Template}) ->
                         %% better distribute the load, effectively making it `random'
                         %% dispatch if the key is absent and we are using `key_dispatch'.
                         %% Otherwise, it'll be deterministic.
-                        emqx_guid:gen();
+                        emqx_guid:to_base62(emqx_guid:gen());
                     Key ->
                         Key
                 end

+ 1 - 1
apps/emqx_resource/src/emqx_resource_metrics.erl

@@ -402,7 +402,7 @@ retried_failed_inc(ID, Val) ->
 retried_failed_get(ID) ->
     emqx_metrics_worker:get(?RES_METRICS, ID, 'retried.failed').
 
-%% @doc Count messages that were sucessfully sent after at least one retry
+%% @doc Count messages that were successfully sent after at least one retry
 retried_success_inc(ID) ->
     retried_success_inc(ID, 1).
 

+ 1 - 1
apps/emqx_rule_engine/src/emqx_rule_events.erl

@@ -844,7 +844,7 @@ test_columns('client.connack') ->
     [
         {<<"clientid">>, [<<"c_emqx">>, <<"the clientid if the client">>]},
         {<<"username">>, [<<"u_emqx">>, <<"the username if the client">>]},
-        {<<"reason_code">>, [<<"sucess">>, <<"the reason code">>]}
+        {<<"reason_code">>, [<<"success">>, <<"the reason code">>]}
     ];
 test_columns('client.check_authz_complete') ->
     [

+ 1 - 1
apps/emqx_rule_engine/test/emqx_rule_engine_api_2_SUITE.erl

@@ -243,7 +243,7 @@ t_rule_test_smoke(_Config) ->
                         #{
                             <<"clientid">> => <<"c_emqx">>,
                             <<"event_type">> => <<"client_connack">>,
-                            <<"reason_code">> => <<"sucess">>,
+                            <<"reason_code">> => <<"success">>,
                             <<"username">> => <<"u_emqx">>
                         },
                     <<"sql">> => <<"SELECT\n  *\nFROM\n  \"t/#\"">>

+ 1 - 1
apps/emqx_rule_engine/test/emqx_rule_engine_api_rule_test_SUITE.erl

@@ -165,7 +165,7 @@ t_ctx_connack(_) ->
             clean_start => true,
             clientid => <<"c_emqx">>,
             event_type => client_connack,
-            reason_code => <<"sucess">>,
+            reason_code => <<"success">>,
             username => <<"u_emqx">>
         },
     Expected = check_result([clientid, username, reason_code], [node], Context),