diff --git a/src/test/java/com/guo/learningprogresstracker/service/impl/AiTaskIntegrationTest.java b/src/test/java/com/guo/learningprogresstracker/service/impl/AiTaskIntegrationTest.java index 0f3eeb8..e5b4af0 100644 --- a/src/test/java/com/guo/learningprogresstracker/service/impl/AiTaskIntegrationTest.java +++ b/src/test/java/com/guo/learningprogresstracker/service/impl/AiTaskIntegrationTest.java @@ -145,7 +145,7 @@ class AiTaskIntegrationTest { } Thread.sleep(50); } - fail("任务在 5 秒内未进入终态,最后状态: " + (response == null ? "null" : response.getStatus())); + fail("任务在 15 秒内未进入终态,最后状态: " + (response == null ? "null" : response.getStatus())); return response; } @@ -264,7 +264,8 @@ class AiTaskIntegrationTest { AiTaskResponse submitted = aiTaskService.submit(request("MIND_MAP", taskNum, Map.of("mode", "full"))); AiTaskResponse finalState = null; - for (int i = 0; i < 50; i++) { + // 全量测试时 JVM 负载高,异步投递可能被推迟,因此给足等待窗口(断言本身不放宽) + for (int i = 0; i < 150; i++) { Thread.sleep(100); finalState = aiTaskService.getByTaskNum(submitted.getTaskNum()); if (finalState.getStatus().equals(AiTaskStatusEnum.SUCCEEDED.name())