mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 18:58:26 +00:00
fix: stabilize memory sync progress
This commit is contained in:
@@ -84,12 +84,12 @@ describe("memory manager sync failures", () => {
|
||||
// Call the internal scheduler directly; it uses fire-and-forget sync.
|
||||
(manager as unknown as { scheduleWatchSync: () => void }).scheduleWatchSync();
|
||||
|
||||
await vi.runAllTimersAsync();
|
||||
await vi.runOnlyPendingTimersAsync();
|
||||
const syncPromise = syncSpy.mock.results[0]?.value as Promise<void> | undefined;
|
||||
vi.useRealTimers();
|
||||
if (syncPromise) {
|
||||
await syncPromise.catch(() => undefined);
|
||||
}
|
||||
await vi.runOnlyPendingTimersAsync();
|
||||
|
||||
process.off("unhandledRejection", handler);
|
||||
expect(unhandled).toHaveLength(0);
|
||||
|
||||
Reference in New Issue
Block a user