mirror of
https://github.com/openclaw/openclaw.git
synced 2026-02-19 18:39:20 -05:00
perf(test): tighten fake timer windows in channel restart tests
This commit is contained in:
@@ -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);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user