From 309e354dc39a849066f4eb5959a75980abe690da Mon Sep 17 00:00:00 2001 From: Florian Hussonnois Date: Thu, 28 Mar 2024 13:11:18 +0100 Subject: [PATCH] chore(test): fix worker api --- .../java/io/kestra/plugin/jdbc/AbstractJdbcTriggerTest.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugin-jdbc/src/test/java/io/kestra/plugin/jdbc/AbstractJdbcTriggerTest.java b/plugin-jdbc/src/test/java/io/kestra/plugin/jdbc/AbstractJdbcTriggerTest.java index 6860665f..421b17c5 100644 --- a/plugin-jdbc/src/test/java/io/kestra/plugin/jdbc/AbstractJdbcTriggerTest.java +++ b/plugin-jdbc/src/test/java/io/kestra/plugin/jdbc/AbstractJdbcTriggerTest.java @@ -9,6 +9,7 @@ import io.kestra.core.schedulers.AbstractScheduler; import io.kestra.core.schedulers.DefaultScheduler; import io.kestra.core.schedulers.SchedulerTriggerStateInterface; +import io.kestra.core.utils.IdUtils; import io.micronaut.context.ApplicationContext; import jakarta.inject.Inject; import jakarta.inject.Named; @@ -54,13 +55,13 @@ protected Execution triggerFlow(ClassLoader classLoader, String flowRepository, CountDownLatch queueCount = new CountDownLatch(1); // scheduler - Worker worker = new Worker(applicationContext, 8, null); try ( AbstractScheduler scheduler = new DefaultScheduler( this.applicationContext, this.flowListenersService, this.triggerState ); + Worker worker = applicationContext.createBean(Worker.class, IdUtils.create(), 8, null); ) { AtomicReference last = new AtomicReference<>();