隔离头程定时任务执行线程
This commit is contained in:
@@ -5,6 +5,9 @@ import org.junit.jupiter.api.Test;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
|
||||
import java.nio.file.Files;
|
||||
import java.nio.file.Path;
|
||||
|
||||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
class BaiyueFirstlegApplicationContractTest {
|
||||
@@ -22,4 +25,12 @@ class BaiyueFirstlegApplicationContractTest {
|
||||
|
||||
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