|
|
@ -31,6 +31,7 @@ public class RunStateHandlerTest {
|
|
|
|
@SuppressWarnings("all")
|
|
|
|
@SuppressWarnings("all")
|
|
|
|
public void runStateHandlerTest() {
|
|
|
|
public void runStateHandlerTest() {
|
|
|
|
log.info("Test thread pool runtime state interface...");
|
|
|
|
log.info("Test thread pool runtime state interface...");
|
|
|
|
|
|
|
|
ThreadUtil.sleep(5000);
|
|
|
|
|
|
|
|
|
|
|
|
// 启动动态线程池模拟运行任务
|
|
|
|
// 启动动态线程池模拟运行任务
|
|
|
|
runTask(messageCenterDynamicThreadPool.getExecutor());
|
|
|
|
runTask(messageCenterDynamicThreadPool.getExecutor());
|
|
|
@ -42,7 +43,6 @@ public class RunStateHandlerTest {
|
|
|
|
|
|
|
|
|
|
|
|
private void runTask(ExecutorService executorService) {
|
|
|
|
private void runTask(ExecutorService executorService) {
|
|
|
|
new Thread(() -> {
|
|
|
|
new Thread(() -> {
|
|
|
|
ThreadUtil.sleep(5000);
|
|
|
|
|
|
|
|
for (int i = 0; i < Integer.MAX_VALUE; i++) {
|
|
|
|
for (int i = 0; i < Integer.MAX_VALUE; i++) {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
executorService.execute(() -> {
|
|
|
|
executorService.execute(() -> {
|
|
|
|