fix(tests): attempt to bump amount of executor threads in TestRunner

This commit is contained in:
brian.mulier
2025-11-26 15:45:24 +01:00
committed by brian-mulier-p
parent 371c1281ca
commit af87713258
3 changed files with 3 additions and 2 deletions

View File

@@ -47,4 +47,4 @@ public @interface KestraTest {
boolean startApplication() default true;
boolean resolveParameters() default true;
}
}

View File

@@ -11,6 +11,7 @@ import org.junit.platform.commons.support.AnnotationSupport;
public class KestraTestExtension extends MicronautJunit5Extension {
@Override
protected MicronautTestValue buildMicronautTestValue(Class<?> testClass) {
testProperties.put("kestra.jdbc.executor.thread-count", Runtime.getRuntime().availableProcessors() * 4);
return AnnotationSupport
.findAnnotation(testClass, KestraTest.class)
.map(kestraTestAnnotation -> new MicronautTestValue(

View File

@@ -25,7 +25,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
@Slf4j
@Singleton
public class TestRunner implements Runnable, AutoCloseable {
@Setter private int workerThread = Math.max(3, Runtime.getRuntime().availableProcessors()) * 16;
@Setter private int workerThread = Math.max(3, Runtime.getRuntime().availableProcessors()) * 4;
@Setter private boolean schedulerEnabled = true;
@Setter private boolean workerEnabled = true;