mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-06 06:20:43 +00:00
test(memory): stabilize reindex and cron checks
This commit is contained in:
@@ -19,7 +19,7 @@ export type MemoryIndexMeta = {
|
||||
export function resolveConfiguredSourcesForMeta(sources: Iterable<MemorySource>): MemorySource[] {
|
||||
const normalized = Array.from(sources)
|
||||
.filter((source): source is MemorySource => source === "memory" || source === "sessions")
|
||||
.toSorted();
|
||||
.toSorted((left, right) => left.localeCompare(right));
|
||||
return normalized.length > 0 ? normalized : ["memory"];
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ export function normalizeMetaSources(meta: MemoryIndexMeta): MemorySource[] {
|
||||
(source): source is MemorySource => source === "memory" || source === "sessions",
|
||||
),
|
||||
),
|
||||
).toSorted();
|
||||
).toSorted((left, right) => left.localeCompare(right));
|
||||
return normalized.length > 0 ? normalized : ["memory"];
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@ vi.mock("../plugin-sdk/browser-maintenance.js", () => ({
|
||||
}));
|
||||
|
||||
installGatewayTestHooks({ scope: "suite" });
|
||||
const CRON_WAIT_TIMEOUT_MS = 3_000;
|
||||
const CRON_WAIT_TIMEOUT_MS = 10_000;
|
||||
const EMPTY_CRON_STORE_CONTENT = JSON.stringify({ version: 1, jobs: [] });
|
||||
let cronSuiteTempRootPromise: Promise<string> | null = null;
|
||||
let cronSuiteCaseId = 0;
|
||||
|
||||
Reference in New Issue
Block a user