chore: port diverged modules back to oss

This commit is contained in:
zmstone 2024-05-27 22:40:08 +02:00
parent 238c207b09
commit 96ef37d0ea
6 changed files with 17 additions and 8 deletions

View File

@ -55,6 +55,8 @@
%% only for testing/mocking
-export([supported_versions/1]).
-export([format_bridge_metrics/1, format_metrics/1]).
-define(BPAPI_NAME, emqx_bridge).
-define(BRIDGE_NOT_ENABLED,

View File

@ -1,6 +1,6 @@
{application, emqx_bridge_sqlserver, [
{description, "EMQX Enterprise SQL Server Bridge"},
{vsn, "0.2.0"},
{vsn, "0.2.1"},
{registered, []},
{applications, [kernel, stdlib, emqx_resource, odbc]},
{env, [

View File

@ -478,7 +478,7 @@ worker_do_insert(
{error, {unrecoverable_error, {invalid_request, Reason}}}
end.
-spec execute(pid(), sql()) ->
-spec execute(connection_reference(), sql()) ->
updated_tuple()
| selected_tuple()
| [updated_tuple()]
@ -487,7 +487,7 @@ worker_do_insert(
execute(Conn, SQL) ->
odbc:sql_query(Conn, str(SQL)).
-spec execute(pid(), sql(), time_out()) ->
-spec execute(connection_reference(), sql(), time_out()) ->
updated_tuple()
| selected_tuple()
| [updated_tuple()]

View File

@ -73,11 +73,21 @@
(?CE_AUTHN_PROVIDER_SCHEMA_MODS ++ ?EE_AUTHN_PROVIDER_SCHEMA_MODS)
).
-define(OTHER_INJECTING_CONFIGS, []).
-else.
-define(AUTHZ_SOURCE_SCHEMA_MODS, ?CE_AUTHZ_SOURCE_SCHEMA_MODS).
-define(AUTHN_PROVIDER_SCHEMA_MODS, ?CE_AUTHN_PROVIDER_SCHEMA_MODS).
-endif.
-define(OTHER_INJECTING_CONFIGS, []).
-endif.
-define(INJECTING_CONFIGS, [
{emqx_authn_schema, ?AUTHN_PROVIDER_SCHEMA_MODS},
{emqx_authz_schema, ?AUTHZ_SOURCE_SCHEMA_MODS}
| ?OTHER_INJECTING_CONFIGS
]).
-endif.

View File

@ -70,10 +70,6 @@
emqx_otel_schema,
emqx_mgmt_api_key_schema
]).
-define(INJECTING_CONFIGS, [
{emqx_authn_schema, ?AUTHN_PROVIDER_SCHEMA_MODS},
{emqx_authz_schema, ?AUTHZ_SOURCE_SCHEMA_MODS}
]).
%% 1 million default ports counter
-define(DEFAULT_MAX_PORTS, 1024 * 1024).

View File

@ -375,6 +375,7 @@ t_clean(Config) ->
[{qos, 0}, {retain, true}],
Config
),
ct:sleep(100),
{ok, #{}, [0]} = emqtt:subscribe(C1, <<"retained/#">>, [{qos, 0}, {rh, 0}]),
?assertEqual(3, length(receive_messages(3))),