fix(connector): test case conflict
This commit is contained in:
parent
f0c61068e8
commit
37aeb28a79
|
@ -292,6 +292,7 @@ subscribers(Group, Topic) ->
|
||||||
%%--------------------------------------------------------------------
|
%%--------------------------------------------------------------------
|
||||||
|
|
||||||
init([]) ->
|
init([]) ->
|
||||||
|
mria:wait_for_tables([?TAB]),
|
||||||
{ok, _} = mnesia:subscribe({table, ?TAB, simple}),
|
{ok, _} = mnesia:subscribe({table, ?TAB, simple}),
|
||||||
{atomic, PMon} = mria:transaction(?SHARED_SUB_SHARD, fun init_monitors/0),
|
{atomic, PMon} = mria:transaction(?SHARED_SUB_SHARD, fun init_monitors/0),
|
||||||
ok = emqx_tables:new(?SHARED_SUBS, [protected, bag]),
|
ok = emqx_tables:new(?SHARED_SUBS, [protected, bag]),
|
||||||
|
|
|
@ -57,12 +57,14 @@ init_per_suite(Config) ->
|
||||||
}]
|
}]
|
||||||
}),
|
}),
|
||||||
_ = application:load(emqx_conf),
|
_ = application:load(emqx_conf),
|
||||||
|
%% some testcases (may from other app) already get emqx_connector started
|
||||||
|
_ = application:stop(emqx_resource),
|
||||||
|
_ = application:stop(emqx_connector),
|
||||||
ok = emqx_common_test_helpers:start_apps([emqx_bridge, emqx_dashboard]),
|
ok = emqx_common_test_helpers:start_apps([emqx_bridge, emqx_dashboard]),
|
||||||
ok = emqx_config:init_load(emqx_bridge_schema, ?CONF_DEFAULT),
|
ok = emqx_config:init_load(emqx_bridge_schema, ?CONF_DEFAULT),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(_Config) ->
|
||||||
ok = ekka:stop(),
|
|
||||||
emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_dashboard]),
|
emqx_common_test_helpers:stop_apps([emqx_bridge, emqx_dashboard]),
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
|
|
|
@ -68,15 +68,16 @@ init_per_suite(Config) ->
|
||||||
}]
|
}]
|
||||||
}),
|
}),
|
||||||
_ = application:load(emqx_conf),
|
_ = application:load(emqx_conf),
|
||||||
|
%% some testcases (may from other app) already get emqx_connector started
|
||||||
|
_ = application:stop(emqx_resource),
|
||||||
|
_ = application:stop(emqx_connector),
|
||||||
ok = emqx_common_test_helpers:start_apps([emqx_connector, emqx_bridge, emqx_dashboard]),
|
ok = emqx_common_test_helpers:start_apps([emqx_connector, emqx_bridge, emqx_dashboard]),
|
||||||
ok = emqx_config:init_load(emqx_connector_schema, ?CONF_DEFAULT),
|
ok = emqx_config:init_load(emqx_connector_schema, ?CONF_DEFAULT),
|
||||||
ok = emqx_config:init_load(emqx_bridge_schema, ?BRIDGE_CONF_DEFAULT),
|
ok = emqx_config:init_load(emqx_bridge_schema, ?BRIDGE_CONF_DEFAULT),
|
||||||
Config.
|
Config.
|
||||||
|
|
||||||
end_per_suite(_Config) ->
|
end_per_suite(_Config) ->
|
||||||
ok = ekka:stop(),
|
|
||||||
emqx_common_test_helpers:stop_apps([emqx_connector, emqx_bridge, emqx_dashboard]),
|
emqx_common_test_helpers:stop_apps([emqx_connector, emqx_bridge, emqx_dashboard]),
|
||||||
application:unload(emqx_conf),
|
|
||||||
ok.
|
ok.
|
||||||
|
|
||||||
init_per_testcase(_, Config) ->
|
init_per_testcase(_, Config) ->
|
||||||
|
|
Loading…
Reference in New Issue