From 499a32ce36bd34e50cccd03147e7883918af9540 Mon Sep 17 00:00:00 2001 From: Erik Timan Date: Thu, 1 Dec 2022 16:38:03 +0100 Subject: [PATCH] test: remove unnecessary async tests in EE mysql bridge The async test cases is not needed since the mysql connector uses the always_sync callback mode. --- .../test/emqx_ee_bridge_mysql_SUITE.erl | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/lib-ee/emqx_ee_bridge/test/emqx_ee_bridge_mysql_SUITE.erl b/lib-ee/emqx_ee_bridge/test/emqx_ee_bridge_mysql_SUITE.erl index 0d8f68b39..292c02580 100644 --- a/lib-ee/emqx_ee_bridge/test/emqx_ee_bridge_mysql_SUITE.erl +++ b/lib-ee/emqx_ee_bridge/test/emqx_ee_bridge_mysql_SUITE.erl @@ -43,21 +43,15 @@ groups() -> TCs = emqx_common_test_helpers:all(?MODULE), [ {with_batch, [ - {group, sync_query}, - {group, async_query} + {group, sync_query} ]}, {without_batch, [ - {group, sync_query}, - {group, async_query} + {group, sync_query} ]}, {sync_query, [ {group, tcp}, {group, tls} ]}, - {async_query, [ - {group, tcp}, - {group, tls} - ]}, {tcp, TCs}, {tls, TCs} ]. @@ -86,8 +80,6 @@ init_per_group(tls, Config0) -> common_init(Config); init_per_group(sync_query, Config) -> [{query_mode, sync} | Config]; -init_per_group(async_query, Config) -> - [{query_mode, async} | Config]; init_per_group(with_batch, Config) -> [{enable_batch, true} | Config]; init_per_group(without_batch, Config) -> @@ -387,7 +379,6 @@ t_write_failure(Config) -> ProxyName = ?config(proxy_name, Config), ProxyPort = ?config(proxy_port, Config), ProxyHost = ?config(proxy_host, Config), - QueryMode = ?config(query_mode, Config), {ok, _} = create_bridge(Config), Val = integer_to_binary(erlang:unique_integer()), SentData = #{payload => Val, timestamp => 1668602148000}, @@ -396,12 +387,7 @@ t_write_failure(Config) -> send_message(Config, SentData) end), fun(Result, _Trace) -> - case QueryMode of - sync -> - ?assertMatch({error, {resource_error, _}}, Result); - async -> - ?assertEqual(ok, Result) - end, + ?assertMatch({error, {resource_error, _}}, Result), ok end ),