隔离头程定时任务执行线程
This commit is contained in:
@@ -24,6 +24,11 @@ spring:
|
|||||||
multipart:
|
multipart:
|
||||||
max-file-size: ${FIRSTLEG_MULTIPART_MAX_FILE_SIZE:50MB}
|
max-file-size: ${FIRSTLEG_MULTIPART_MAX_FILE_SIZE:50MB}
|
||||||
max-request-size: ${FIRSTLEG_MULTIPART_MAX_REQUEST_SIZE:52MB}
|
max-request-size: ${FIRSTLEG_MULTIPART_MAX_REQUEST_SIZE:52MB}
|
||||||
|
task:
|
||||||
|
scheduling:
|
||||||
|
pool:
|
||||||
|
size: ${FIRSTLEG_SCHEDULING_POOL_SIZE:5}
|
||||||
|
thread-name-prefix: firstleg-scheduler-
|
||||||
baiyue:
|
baiyue:
|
||||||
carrier-schedule:
|
carrier-schedule:
|
||||||
providers:
|
providers:
|
||||||
|
|||||||
@@ -5,6 +5,9 @@ import org.junit.jupiter.api.Test;
|
|||||||
import org.mybatis.spring.annotation.MapperScan;
|
import org.mybatis.spring.annotation.MapperScan;
|
||||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||||
|
|
||||||
|
import java.nio.file.Files;
|
||||||
|
import java.nio.file.Path;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
class BaiyueFirstlegApplicationContractTest {
|
class BaiyueFirstlegApplicationContractTest {
|
||||||
@@ -22,4 +25,12 @@ class BaiyueFirstlegApplicationContractTest {
|
|||||||
|
|
||||||
assertThat(clients.basePackages()).containsExactly("com.baiyue.firstleg");
|
assertThat(clients.basePackages()).containsExactly("com.baiyue.firstleg");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void scheduledWorkersDoNotShareTheDefaultSingleThread() throws Exception {
|
||||||
|
String application = Files.readString(Path.of("src/main/resources/application.yml"));
|
||||||
|
|
||||||
|
assertThat(application).contains("FIRSTLEG_SCHEDULING_POOL_SIZE:5");
|
||||||
|
assertThat(application).contains("thread-name-prefix: firstleg-scheduler-");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user