fix(cth-suite): use cheaper check for loaded applications

This commit is contained in:
Andrew Mayorov 2024-01-30 21:06:40 +01:00
parent 82a4e6ef68
commit 8f2a4f7b19
No known key found for this signature in database
GPG Key ID: 2837C62ACFBFED5D
1 changed files with 1 additions and 2 deletions

View File

@ -177,10 +177,9 @@ load_appspec({App, _Opts}) ->
load_app_deps(App).
load_app_deps(App) ->
AlreadyLoaded = [A || {A, _, _} <- application:loaded_applications()],
case application:get_key(App, applications) of
{ok, Deps} ->
Apps = Deps -- AlreadyLoaded,
Apps = [D || D <- Deps, application:get_key(D, id) == undefined],
ok = lists:foreach(fun emqx_common_test_helpers:load/1, Apps),
ok = lists:foreach(fun load_app_deps/1, Apps);
undefined ->