From ec1ff14759c443db12d424bccd1100c5aec4d343 Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Tue, 19 Apr 2022 15:36:47 -0300 Subject: [PATCH] fix(test): fix flaky test node setup --- apps/emqx_modules/test/emqx_telemetry_SUITE.erl | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/apps/emqx_modules/test/emqx_telemetry_SUITE.erl b/apps/emqx_modules/test/emqx_telemetry_SUITE.erl index 0c3740524..db4ffcd22 100644 --- a/apps/emqx_modules/test/emqx_telemetry_SUITE.erl +++ b/apps/emqx_modules/test/emqx_telemetry_SUITE.erl @@ -662,7 +662,12 @@ host() -> Host. ebin_path() -> - string:join(["-pa" | lists:filter(fun is_lib/1, code:get_path())], " "). + string:join(["-pa" | paths()], " "). -is_lib(Path) -> - string:prefix(Path, code:lib_dir()) =:= nomatch. +paths() -> + [ + Path + || Path <- code:get_path(), + string:prefix(Path, code:lib_dir()) =:= nomatch, + string:str(Path, "_build/default/plugins") =:= 0 + ].