mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 11:44:15 +00:00
test: reduce web auto-reply watchdog timer churn
This commit is contained in:
@@ -24,6 +24,7 @@ function startMonitorWebChannel(params: {
|
||||
listenerFactory: unknown;
|
||||
sleep: ReturnType<typeof vi.fn>;
|
||||
signal?: AbortSignal;
|
||||
heartbeatSeconds?: number;
|
||||
reconnect?: { initialMs: number; maxMs: number; maxAttempts: number; factor: number };
|
||||
}) {
|
||||
const runtime = createRuntime();
|
||||
@@ -36,7 +37,7 @@ function startMonitorWebChannel(params: {
|
||||
runtime as never,
|
||||
params.signal ?? controller.signal,
|
||||
{
|
||||
heartbeatSeconds: 1,
|
||||
heartbeatSeconds: params.heartbeatSeconds ?? 1,
|
||||
reconnect: params.reconnect ?? { initialMs: 10, maxMs: 10, maxAttempts: 3, factor: 1.1 },
|
||||
sleep: params.sleep,
|
||||
},
|
||||
@@ -149,6 +150,7 @@ describe("web auto-reply", () => {
|
||||
monitorWebChannelFn: monitorWebChannel as never,
|
||||
listenerFactory,
|
||||
sleep,
|
||||
heartbeatSeconds: 60,
|
||||
});
|
||||
|
||||
await Promise.resolve();
|
||||
|
||||
Reference in New Issue
Block a user