diff --git a/src/test/java/io/kestra/plugin/pulsar/RealtimeTriggerTest.java b/src/test/java/io/kestra/plugin/pulsar/RealtimeTriggerTest.java index d476122..0cb4519 100644 --- a/src/test/java/io/kestra/plugin/pulsar/RealtimeTriggerTest.java +++ b/src/test/java/io/kestra/plugin/pulsar/RealtimeTriggerTest.java @@ -9,9 +9,8 @@ import io.kestra.core.runners.RunContextFactory; import io.kestra.core.runners.Worker; import io.kestra.core.schedulers.AbstractScheduler; -import io.kestra.core.schedulers.DefaultScheduler; -import io.kestra.core.schedulers.SchedulerTriggerStateInterface; import io.kestra.core.utils.TestsUtils; +import io.kestra.jdbc.runner.JdbcScheduler; import io.micronaut.context.ApplicationContext; import io.kestra.core.junit.annotations.KestraTest; import jakarta.inject.Inject; @@ -34,9 +33,6 @@ class RealtimeTriggerTest { @Inject private ApplicationContext applicationContext; - @Inject - private SchedulerTriggerStateInterface triggerState; - @Inject private FlowListeners flowListenersService; @@ -57,16 +53,15 @@ void flow() throws Exception { // scheduler try ( Worker worker = applicationContext.createBean(Worker.class, UUID.randomUUID().toString(), 8, null); - AbstractScheduler scheduler = new DefaultScheduler( + AbstractScheduler scheduler = new JdbcScheduler( this.applicationContext, - this.flowListenersService, - this.triggerState + this.flowListenersService ); ) { AtomicReference last = new AtomicReference<>(); // wait for execution - executionQueue.receive(RealtimeTriggerTest.class, execution -> { + executionQueue.receive(execution -> { last.set(execution.getLeft()); queueCount.countDown(); diff --git a/src/test/java/io/kestra/plugin/pulsar/TriggerTest.java b/src/test/java/io/kestra/plugin/pulsar/TriggerTest.java index eb2d269..07ea584 100644 --- a/src/test/java/io/kestra/plugin/pulsar/TriggerTest.java +++ b/src/test/java/io/kestra/plugin/pulsar/TriggerTest.java @@ -9,8 +9,7 @@ import io.kestra.core.runners.RunContextFactory; import io.kestra.core.runners.Worker; import io.kestra.core.schedulers.AbstractScheduler; -import io.kestra.core.schedulers.DefaultScheduler; -import io.kestra.core.schedulers.SchedulerTriggerStateInterface; +import io.kestra.jdbc.runner.JdbcScheduler; import io.kestra.core.utils.TestsUtils; import io.micronaut.context.ApplicationContext; import io.kestra.core.junit.annotations.KestraTest; @@ -33,9 +32,6 @@ class TriggerTest { @Inject private ApplicationContext applicationContext; - @Inject - private SchedulerTriggerStateInterface triggerState; - @Inject private FlowListeners flowListenersService; @@ -56,16 +52,15 @@ void flow() throws Exception { // scheduler Worker worker = new Worker(applicationContext, 8, null); try ( - AbstractScheduler scheduler = new DefaultScheduler( + AbstractScheduler scheduler = new JdbcScheduler( this.applicationContext, - this.flowListenersService, - this.triggerState + this.flowListenersService ); ) { AtomicReference last = new AtomicReference<>(); // wait for execution - executionQueue.receive(TriggerTest.class, execution -> { + executionQueue.receive(execution -> { last.set(execution.getLeft()); queueCount.countDown();