mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-29 19:01:44 +00:00
test: stabilize telegram stalled-runner restart assertion
This commit is contained in:
@@ -553,7 +553,9 @@ describe("monitorTelegramProvider (grammY)", () => {
|
||||
|
||||
expect(emitUnhandledRejection(await makeTaggedPollingFetchError())).toBe(true);
|
||||
expect(firstCycle.stop).toHaveBeenCalledTimes(1);
|
||||
await vi.waitFor(() => expect(runSpy).toHaveBeenCalledTimes(2));
|
||||
// Unhandled polling rejections restart via TelegramPollingSession backoff,
|
||||
// so the second runner cycle is not immediate.
|
||||
await vi.waitFor(() => expect(runSpy).toHaveBeenCalledTimes(2), { timeout: 4_000 });
|
||||
abort.abort();
|
||||
await monitor;
|
||||
expectRecoverableRetryState(2);
|
||||
|
||||
Reference in New Issue
Block a user