diff --git a/core/src/test/java/io/kestra/core/Helpers.java b/core/src/test/java/io/kestra/core/Helpers.java index 35288dbad4..9a8beadc6a 100644 --- a/core/src/test/java/io/kestra/core/Helpers.java +++ b/core/src/test/java/io/kestra/core/Helpers.java @@ -19,7 +19,7 @@ import java.util.function.Consumer; public class Helpers { - public static long FLOWS_COUNT = 66; + public static long FLOWS_COUNT = 67; public static ApplicationContext applicationContext() throws URISyntaxException { return applicationContext( diff --git a/core/src/test/java/io/kestra/core/tasks/flows/TemplateTest.java b/core/src/test/java/io/kestra/core/tasks/flows/TemplateTest.java index 593b50612a..94ee618d91 100644 --- a/core/src/test/java/io/kestra/core/tasks/flows/TemplateTest.java +++ b/core/src/test/java/io/kestra/core/tasks/flows/TemplateTest.java @@ -12,6 +12,7 @@ import io.kestra.core.runners.ListenersTest; import io.kestra.core.runners.RunnerUtils; import io.kestra.core.tasks.log.Log; +import io.kestra.core.utils.TestsUtils; import jakarta.inject.Inject; import jakarta.inject.Named; import org.junit.jupiter.api.Test; @@ -84,8 +85,7 @@ public static void withFailedTemplate(RunnerUtils runnerUtils, TemplateRepositor assertThat(execution.getTaskRunList(), hasSize(1)); assertThat(execution.getState().getCurrent(), is(State.Type.FAILED)); - LogEntry matchingLog = TestsUtils.awaitLog(logs, logEntry -> logEntry.getMessage().endsWith("Can't find flow template 'io.kestra.tests.invalid'") && logEntry.getLevel() == Level.ERROR); - assertThat(matchingLog, notNullValue()); + assertThat(logs.stream().filter(logEntry -> logEntry.getMessage().endsWith("Can't find flow template 'io.kestra.tests.invalid'")).findFirst().orElseThrow().getLevel(), is(Level.ERROR)); } @Test