mirror of https://github.com/openclaw/openclaw.git
perf(test): tighten fake timer windows in channel restart tests
This commit is contained in:
parent
8b4d449dbc
commit
cb488df572
|
|
@ -124,7 +124,7 @@ describe("server-channels auto restart", () => {
|
|||
const manager = createManager();
|
||||
|
||||
await manager.startChannels();
|
||||
await vi.advanceTimersByTimeAsync(500);
|
||||
await vi.advanceTimersByTimeAsync(200);
|
||||
|
||||
expect(startAccount).toHaveBeenCalledTimes(11);
|
||||
const snapshot = manager.getRuntimeSnapshot();
|
||||
|
|
@ -132,7 +132,7 @@ describe("server-channels auto restart", () => {
|
|||
expect(account?.running).toBe(false);
|
||||
expect(account?.reconnectAttempts).toBe(10);
|
||||
|
||||
await vi.advanceTimersByTimeAsync(500);
|
||||
await vi.advanceTimersByTimeAsync(200);
|
||||
expect(startAccount).toHaveBeenCalledTimes(11);
|
||||
});
|
||||
|
||||
|
|
@ -149,7 +149,7 @@ describe("server-channels auto restart", () => {
|
|||
vi.runAllTicks();
|
||||
await manager.stopChannel("discord", DEFAULT_ACCOUNT_ID);
|
||||
|
||||
await vi.advanceTimersByTimeAsync(500);
|
||||
await vi.advanceTimersByTimeAsync(200);
|
||||
expect(startAccount).toHaveBeenCalledTimes(1);
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue