Skip to content

Commit

Permalink
fix: QueueException on test
Browse files Browse the repository at this point in the history
  • Loading branch information
loicmathieu committed Sep 12, 2024
1 parent ecfc3c4 commit 27adc76
Show file tree
Hide file tree
Showing 14 changed files with 28 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -45,7 +46,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -44,7 +45,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.kestra.core.models.executions.Execution;
import io.kestra.core.models.flows.State;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.core.runners.StandAloneRunner;
Expand Down Expand Up @@ -37,7 +38,7 @@ void init() throws IOException, URISyntaxException {
}

@Test
void testFlow() throws TimeoutException {
void testFlow() throws TimeoutException, QueueException {
Execution execution = runnerUtils.runOne(null, "io.kestra.tests", "mail");
assertThat(execution.getTaskRunList(), hasSize(2));
assertThat(execution.getTaskRunList().get(1).getState().getCurrent(), is(State.Type.FAILED));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -44,7 +45,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -44,7 +45,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import io.kestra.core.models.executions.Execution;
import io.kestra.core.models.flows.State;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.core.runners.StandAloneRunner;
Expand Down Expand Up @@ -37,7 +38,7 @@ void init() throws IOException, URISyntaxException {
}

@Test
void testFlow() throws TimeoutException {
void testFlow() throws TimeoutException, QueueException {
Execution execution = runnerUtils.runOne(null, "io.kestra.tests", "sendgrid");
assertThat(execution.getTaskRunList(), hasSize(2));
assertThat(execution.getTaskRunList().get(1).getState().getCurrent(), is(State.Type.SUCCESS));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -44,7 +45,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package io.kestra.plugin.notifications.slack;

import com.google.common.collect.ImmutableMap;
import io.kestra.core.queues.QueueException;
import io.kestra.plugin.notifications.FakeWebhookController;
import io.micronaut.context.ApplicationContext;
import io.micronaut.runtime.server.EmbeddedServer;
Expand Down Expand Up @@ -43,7 +44,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -43,7 +44,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.core.runners.StandAloneRunner;
Expand Down Expand Up @@ -43,7 +44,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -44,7 +45,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -45,7 +46,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import com.google.common.collect.ImmutableMap;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.plugin.notifications.FakeWebhookController;
Expand Down Expand Up @@ -44,7 +45,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
import com.google.common.collect.ImmutableMap;
import io.kestra.core.junit.annotations.KestraTest;
import io.kestra.core.models.executions.Execution;
import io.kestra.core.queues.QueueException;
import io.kestra.core.repositories.LocalFlowRepositoryLoader;
import io.kestra.core.runners.RunnerUtils;
import io.kestra.core.runners.StandAloneRunner;
Expand Down Expand Up @@ -43,7 +44,7 @@ protected void init() throws IOException, URISyntaxException {
}

@Test
void flow() throws TimeoutException {
void flow() throws TimeoutException, QueueException {
EmbeddedServer embeddedServer = applicationContext.getBean(EmbeddedServer.class);
embeddedServer.start();

Expand Down

0 comments on commit 27adc76

Please sign in to comment.