feat: extend stall timeout and remove sample cap
This commit is contained in:
1 parent
27f9f4add8
commit
eb6ea70e19
9 files changed
+105
-45
No files matched your search
@@ -0,0 +1,21 @@
|
||||
import { expect, test } from "@playwright/test";
|
||||
|
||||
import {
|
||||
SIMULATION_SOLVER_STALL_TIMEOUT_MINUTES,
|
||||
SIMULATION_SOLVER_STALL_TIMEOUT_MS,
|
||||
solverStallTimeoutMessage,
|
||||
solverStallTimeoutReached,
|
||||
} from "../../src/simulationTimeout";
|
||||
|
||||
test("solver stall watchdog allows the validated long-running window", () => {
|
||||
expect(SIMULATION_SOLVER_STALL_TIMEOUT_MINUTES).toBe(15);
|
||||
expect(SIMULATION_SOLVER_STALL_TIMEOUT_MS).toBe(900_000);
|
||||
expect(solverStallTimeoutReached(1_000, 900_999)).toBe(false);
|
||||
expect(solverStallTimeoutReached(1_000, 901_000)).toBe(true);
|
||||
});
|
||||
|
||||
test("solver stall messages use the configured duration", () => {
|
||||
expect(solverStallTimeoutMessage("detected")).toContain("连续 15 分钟");
|
||||
expect(solverStallTimeoutMessage("recovering")).toContain("连续 15 分钟");
|
||||
expect(solverStallTimeoutMessage("recovering")).toContain("恢复部分结果");
|
||||
});
|
||||
Reference in new issue
Block a user