Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

test(items): wait for the method import's NO KEY UPDATE lock

Raul04a672bf7874
diff --git a/apps/erp/test/database/method-import-guards.test.ts b/apps/erp/test/database/method-import-guards.test.ts
index 41299a0c8c..366f5c4c7f 100644
--- a/apps/erp/test/database/method-import-guards.test.ts
+++ b/apps/erp/test/database/method-import-guards.test.ts
@@ -29,7 +29,7 @@ async function waitForLockWait(
WHERE datname = current_database()
AND pid <> pg_backend_pid()
AND wait_event_type = 'Lock'
- AND query ILIKE '%for update%'`.execute(db);
+ AND query ~* 'for (no key )?update'`.execute(db);
if (rows[0]!.waiting > 0) return;
await new Promise((resolve) => setTimeout(resolve, 25));
}