Skip to content

Garry's Opinionated OpenClaw/Hermes Agent Brain

TypeScript

test: #7388 Postgres arm runs through an e2e registerPostgresTests wrapper (the unit-postgres-arms shards are at their budget)

garrytan5c3875170ff8
diff --git a/test/e2e/multi-source-drift-param-cap-7388-postgres.test.ts b/test/e2e/multi-source-drift-param-cap-7388-postgres.test.ts
new file mode 100644
index 0000000000..ffe2f30ad9
--- /dev/null
+++ b/test/e2e/multi-source-drift-param-cap-7388-postgres.test.ts
@@ -0,0 +1,3 @@
+import { registerPostgresTests } from '../helpers/test-backends.ts';
+
+await registerPostgresTests(() => import('../multi-source-drift-param-cap-7388.test.ts'));
diff --git a/test/multi-source-drift-param-cap-7388.test.ts b/test/multi-source-drift-param-cap-7388.test.ts
index fc6c1bf916..c469dada73 100644
--- a/test/multi-source-drift-param-cap-7388.test.ts
+++ b/test/multi-source-drift-param-cap-7388.test.ts
@@ -9,6 +9,7 @@ import { afterAll, beforeAll, describe, expect, test } from 'bun:test';
import { PGLiteEngine } from '../src/core/pglite-engine.ts';
import { batchProbeExistence } from '../src/core/multi-source-drift.ts';
import { isolatedPersistencePostgres } from './helpers/persistence-postgres.ts';
+import { testBackends } from './helpers/test-backends.ts';
import type { BrainEngine } from '../src/core/engine.ts';
const OVER_THE_CAP = 65_600;
@@ -25,17 +26,18 @@ async function probeOverTheCap(engine: BrainEngine) {
expect(map.get('notes/file-65599')!.size).toBe(0);
}
-describe('multi_source_drift probe past the bind-parameter cap (#7388)', () => {
- let engine: PGLiteEngine;
- beforeAll(async () => { engine = new PGLiteEngine(); await engine.connect({}); await engine.initSchema(); }, 60_000);
- afterAll(async () => { await engine.disconnect(); });
+for (const kind of testBackends()) {
+ describe(`multi_source_drift probe past the bind-parameter cap (#7388; ${kind})`, () => {
+ let engine: BrainEngine;
+ let close: () => Promise<void>;
+ beforeAll(async () => {
+ if (kind === 'postgres') ({ engine, close } = await isolatedPersistencePostgres(process.env.DATABASE_URL!));
+ else { const pglite = new PGLiteEngine(); await pglite.connect({}); await pglite.initSchema(); engine = pglite; close = () => pglite.disconnect(); }
+ }, 120_000);
+ afterAll(async () => { await close?.(); });
- test('PGLite: every slug answers, the misroute and the page at home included', async () => {
- await probeOverTheCap(engine);
- }, 120_000);
-
- test.skipIf(!process.env.DATABASE_URL)('Postgres: every slug answers, the misroute and the page at home included', async () => {
- const pg = await isolatedPersistencePostgres(process.env.DATABASE_URL!);
- try { await probeOverTheCap(pg.engine); } finally { await pg.close(); }
- }, 120_000);
-});
+ test('every slug answers, the misroute and the page at home included', async () => {
+ await probeOverTheCap(engine);
+ }, 120_000);
+ });
+}
diff --git a/test/postgres-unit-arms.txt b/test/postgres-unit-arms.txt
index 8aadf7ce37..160be93ff6 100644
--- a/test/postgres-unit-arms.txt
+++ b/test/postgres-unit-arms.txt
@@ -233,7 +233,6 @@ test/managed-sync-row-parity.test.ts
test/managed-sync-stale-group-head.test.ts
test/migration-persistence-request-id-index.test.ts
test/migration-persistence-request-slug-index.test.ts
-test/multi-source-drift-param-cap-7388.test.ts
test/on-commit-embedding.serial.test.ts
test/oneshot-consumer-direct-route.test.ts
test/oneshot-housekeeping-cli.test.ts