瀏覽代碼

test: refactor EE mysql bridge test case

Co-authored-by: Thales Macedo Garitezi <thalesmg@gmail.com>
Erik Timan 3 年之前
父節點
當前提交
aab914d65a
共有 1 個文件被更改,包括 5 次插入8 次删除
  1. 5 8
      lib-ee/emqx_ee_bridge/test/emqx_ee_bridge_mysql_SUITE.erl

+ 5 - 8
lib-ee/emqx_ee_bridge/test/emqx_ee_bridge_mysql_SUITE.erl

@@ -421,15 +421,12 @@ t_write_timeout(Config) ->
     Val = integer_to_binary(erlang:unique_integer()),
     SentData = #{payload => Val, timestamp => 1668602148000},
     Timeout = 10,
-    ?check_trace(
-        emqx_common_test_helpers:with_failure(timeout, ProxyName, ProxyHost, ProxyPort, fun() ->
+    emqx_common_test_helpers:with_failure(timeout, ProxyName, ProxyHost, ProxyPort, fun() ->
+        ?assertMatch(
+            {error, {resource_error, _}},
             query_resource(Config, {send_message, SentData, [], Timeout})
-        end),
-        fun(Result, _Trace) ->
-            ?assertMatch({error, {resource_error, _}}, Result),
-            ok
-        end
-    ),
+        )
+    end),
     ok.
 
 t_simple_sql_query(Config) ->