test(memory): stabilize reindex and cron checks

This commit is contained in:
Peter Steinberger
2026-04-28 11:36:21 +01:00
parent 6a387afc53
commit d770a3b786
2 changed files with 3 additions and 3 deletions

View File

@@ -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"];
}

View File

@@ -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;