mirror of
https://github.com/kestra-io/kestra.git
synced 2025-12-19 18:05:41 -05:00
feat(tests): rework runner utils to not use the queue during testing (#11380)
* feat(tests): rework runner utils to not use the queue during testing * feat(tests): rework runner utils to not use the queue during testing * test: rework RetryCaseTest to not rely on executionQueue * fix(tests): don't catch the Queue exception * fix(tests): don't catch the Queue exception * fix compile * fix(test): concurrency error and made runner test parallel ready * fix(tests): remove test instance * feat(tests): use Test Runner Utils * fix(tests): flaky tests * fix(test): flaky tests * feat(tests): rework runner utils to not use the queue during testing * feat(tests): rework runner utils to not use the queue during testing * test: rework RetryCaseTest to not rely on executionQueue * fix(tests): don't catch the Queue exception * fix(tests): don't catch the Queue exception * fix compile * fix(test): concurrency error and made runner test parallel ready * fix(tests): remove test instance * feat(tests): use Test Runner Utils * fix(tests): flaky tests * fix(test): flaky tests * fix(tests): flaky set test * fix(tests): remove RunnerUtils * fix(tests): fix flaky * feat(test): rework runner tests to remove the queue usage * feat(test): fix a flaky and remove parallelism from mysql test suit * fix(tests): flaky tests * clean(tests): unwanted test * add debug exec when fail * feat(tests): add thread to mysql thread pool * fix(test): flaky and disable a test --------- Co-authored-by: nKwiatkowski <nkwiatkowski@kestra.io> Co-authored-by: Roman Acevedo <roman.acevedo62@gmail.com>
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
package io.kestra.repository.mysql;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
import io.kestra.core.models.SearchResult;
|
||||
import io.kestra.core.models.flows.Flow;
|
||||
import io.kestra.jdbc.repository.AbstractJdbcLoadedFlowRepositoryTest;
|
||||
import io.micronaut.data.model.Pageable;
|
||||
import io.micronaut.data.model.Sort;
|
||||
import java.util.List;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
public class MysqlLoadedFlowRepositoryTest extends AbstractJdbcLoadedFlowRepositoryTest {
|
||||
|
||||
@Test
|
||||
public void findSourceCode() {
|
||||
List<SearchResult<Flow>> search = flowRepository.findSourceCode(Pageable.from(1, 10, Sort.UNSORTED), "io.kestra.plugin.core.condition.MultipleCondition", TENANT, null);
|
||||
|
||||
assertThat((long) search.size()).isEqualTo(2L);
|
||||
|
||||
SearchResult<Flow> flow = search
|
||||
.stream()
|
||||
.filter(flowSearchResult -> flowSearchResult.getModel()
|
||||
.getId()
|
||||
.equals("trigger-multiplecondition-listener"))
|
||||
.findFirst()
|
||||
.orElseThrow();
|
||||
assertThat(flow.getFragments().getFirst()).contains("condition.MultipleCondition[/mark]");
|
||||
}
|
||||
}
|
||||
@@ -2,27 +2,16 @@ package io.kestra.runner.mysql;
|
||||
|
||||
import io.kestra.core.runners.FlowListeners;
|
||||
import io.kestra.core.runners.FlowListenersTest;
|
||||
import io.kestra.jdbc.JdbcTestUtils;
|
||||
import jakarta.inject.Inject;
|
||||
import java.util.concurrent.TimeoutException;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
class MysqlFlowListenersTest extends FlowListenersTest {
|
||||
@Inject
|
||||
FlowListeners flowListenersService;
|
||||
|
||||
@Inject
|
||||
JdbcTestUtils jdbcTestUtils;
|
||||
|
||||
@Test
|
||||
public void all() throws TimeoutException {
|
||||
this.suite(flowListenersService);
|
||||
}
|
||||
|
||||
@BeforeEach
|
||||
protected void init() {
|
||||
jdbcTestUtils.drop();
|
||||
jdbcTestUtils.migrate();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,10 @@
|
||||
package io.kestra.runner.mysql;
|
||||
|
||||
import io.kestra.jdbc.runner.JdbcRunnerRetryTest;
|
||||
import org.junit.jupiter.api.TestInstance;
|
||||
import org.junit.jupiter.api.TestInstance.Lifecycle;
|
||||
|
||||
@TestInstance(Lifecycle.PER_CLASS)
|
||||
public class MysqlRunnerRetryTest extends JdbcRunnerRetryTest {
|
||||
|
||||
}
|
||||
|
||||
@@ -5,6 +5,11 @@ datasources:
|
||||
username: kestra
|
||||
password: k3str4
|
||||
dialect: MYSQL
|
||||
maximumPoolSize: 32
|
||||
minimumIdle: 8
|
||||
connectionTimeout: 30000
|
||||
idleTimeout: 600000
|
||||
maxLifetime: 1800000
|
||||
|
||||
flyway:
|
||||
datasources:
|
||||
|
||||
Reference in New Issue
Block a user