diff --git a/apps/emqx_connector/test/emqx_connector_mysql_SUITE.erl b/apps/emqx_connector/test/emqx_connector_mysql_SUITE.erl index 6c5932b97..3eec37af1 100644 --- a/apps/emqx_connector/test/emqx_connector_mysql_SUITE.erl +++ b/apps/emqx_connector/test/emqx_connector_mysql_SUITE.erl @@ -90,7 +90,7 @@ perform_lifecycle_check(PoolName, InitialConfig) -> % Can call stop/1 again on an already stopped instance ?assertEqual(ok, emqx_resource:stop(PoolName)), % Make sure it can be restarted and the healthchecks and queries work properly - ?assertEqual(ok, emqx_resource:restart(PoolName)), + ?assertEqual(ok, emqx_resource:restart(PoolName, #{wait_connected => 1000})), {ok, ?CONNECTOR_RESOURCE_GROUP, #{status := InitialStatus}} = emqx_resource:get_instance(PoolName), ?assertEqual(ok, emqx_resource:health_check(PoolName)), ?assertMatch({ok, _, [[1]]}, emqx_resource:query(PoolName, test_query_no_params())), diff --git a/apps/emqx_connector/test/emqx_connector_pgsql_SUITE.erl b/apps/emqx_connector/test/emqx_connector_pgsql_SUITE.erl index 25bf6bb06..b8b3980ac 100644 --- a/apps/emqx_connector/test/emqx_connector_pgsql_SUITE.erl +++ b/apps/emqx_connector/test/emqx_connector_pgsql_SUITE.erl @@ -89,7 +89,7 @@ perform_lifecycle_check(PoolName, InitialConfig) -> % Can call stop/1 again on an already stopped instance ?assertEqual(ok, emqx_resource:stop(PoolName)), % Make sure it can be restarted and the healthchecks and queries work properly - ?assertEqual(ok, emqx_resource:restart(PoolName)), + ?assertEqual(ok, emqx_resource:restart(PoolName, #{wait_connected => 1000})), {ok, ?CONNECTOR_RESOURCE_GROUP, #{status := InitialStatus}} = emqx_resource:get_instance(PoolName), ?assertEqual(ok, emqx_resource:health_check(PoolName)), ?assertMatch({ok, _, [{1}]}, emqx_resource:query(PoolName, test_query_no_params())), diff --git a/apps/emqx_connector/test/emqx_connector_redis_SUITE.erl b/apps/emqx_connector/test/emqx_connector_redis_SUITE.erl index 787872d3c..2b8495dac 100644 --- a/apps/emqx_connector/test/emqx_connector_redis_SUITE.erl +++ b/apps/emqx_connector/test/emqx_connector_redis_SUITE.erl @@ -103,7 +103,7 @@ perform_lifecycle_check(PoolName, InitialConfig, RedisCommand) -> % Can call stop/1 again on an already stopped instance ?assertEqual(ok, emqx_resource:stop(PoolName)), % Make sure it can be restarted and the healthchecks and queries work properly - ?assertEqual(ok, emqx_resource:restart(PoolName)), + ?assertEqual(ok, emqx_resource:restart(PoolName, #{wait_connected => 1000})), {ok, ?CONNECTOR_RESOURCE_GROUP, #{status := InitialStatus}} = emqx_resource:get_instance(PoolName), ?assertEqual(ok, emqx_resource:health_check(PoolName)), ?assertEqual({ok, <<"PONG">>}, emqx_resource:query(PoolName, {cmd, RedisCommand})),