test(bridge_v2): emqx_bridge_v2_kafka_producer_SUITE fix after API change
This commit is contained in:
parent
edb1d37e67
commit
96d6c6db49
|
@ -119,7 +119,7 @@ t_health_check(_) ->
|
||||||
ConnectorConfig = connector_config(),
|
ConnectorConfig = connector_config(),
|
||||||
{ok, _} = emqx_connector:create(?TYPE, test_connector3, ConnectorConfig),
|
{ok, _} = emqx_connector:create(?TYPE, test_connector3, ConnectorConfig),
|
||||||
{ok, _} = emqx_bridge_v2:create(?TYPE, test_bridge_v2, BridgeV2Config),
|
{ok, _} = emqx_bridge_v2:create(?TYPE, test_bridge_v2, BridgeV2Config),
|
||||||
connected = emqx_bridge_v2:health_check(?TYPE, test_bridge_v2),
|
#{status := connected} = emqx_bridge_v2:health_check(?TYPE, test_bridge_v2),
|
||||||
ok = emqx_bridge_v2:remove(?TYPE, test_bridge_v2),
|
ok = emqx_bridge_v2:remove(?TYPE, test_bridge_v2),
|
||||||
%% Check behaviour when bridge does not exist
|
%% Check behaviour when bridge does not exist
|
||||||
{error, bridge_not_found} = emqx_bridge_v2:health_check(?TYPE, test_bridge_v2),
|
{error, bridge_not_found} = emqx_bridge_v2:health_check(?TYPE, test_bridge_v2),
|
||||||
|
|
|
@ -315,7 +315,10 @@ channel_health_check(ResId, ChannelId) ->
|
||||||
safe_call(ResId, {channel_health_check, ChannelId}, ?T_OPERATION).
|
safe_call(ResId, {channel_health_check, ChannelId}, ?T_OPERATION).
|
||||||
|
|
||||||
add_channel(ResId, ChannelId, Config) ->
|
add_channel(ResId, ChannelId, Config) ->
|
||||||
safe_call(ResId, {add_channel, ChannelId, Config}, ?T_OPERATION).
|
Result = safe_call(ResId, {add_channel, ChannelId, Config}, ?T_OPERATION),
|
||||||
|
%% Wait for health_check to finish
|
||||||
|
_ = health_check(ResId),
|
||||||
|
Result.
|
||||||
|
|
||||||
remove_channel(ResId, ChannelId) ->
|
remove_channel(ResId, ChannelId) ->
|
||||||
safe_call(ResId, {remove_channel, ChannelId}, ?T_OPERATION).
|
safe_call(ResId, {remove_channel, ChannelId}, ?T_OPERATION).
|
||||||
|
|
Loading…
Reference in New Issue