From 90fded0ed0690ea0a8c260f7b18d8f4645f5052e Mon Sep 17 00:00:00 2001 From: Andrew Poe Date: Fri, 4 Sep 2026 16:41:50 -0400 Subject: [PATCH] test: give the Postgres test schema a letter prefix The random schema name could start with a digit, which is not a valid unquoted identifier: DROP SCHEMA IF EXISTS 15plv fails with "trailing junk after numeric literal". Seen on PR #532 and again on main after its merge. lockTableName already has a prefix; this does the same. Co-Authored-By: Claude Fable 5.1 --- test/postgres/postgres-lock.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/postgres/postgres-lock.test.js b/test/postgres/postgres-lock.test.js index 1ed6d8f..18016de 100644 --- a/test/postgres/postgres-lock.test.js +++ b/test/postgres/postgres-lock.test.js @@ -13,7 +13,9 @@ const clients = [ describe('Postgres Lock', () => { const lockTableName = `test_lock_${(Math.random() + 1).toString(36).substring(7).toLowerCase()}`; - const testSchema = `${(Math.random() + 1).toString(36).substring(7).toLowerCase()}`; + // Prefixed: an unquoted identifier may not start with a digit, and the random + // suffix sometimes does ("DROP SCHEMA IF EXISTS 15plv" is a syntax error). + const testSchema = `test_schema_${(Math.random() + 1).toString(36).substring(7).toLowerCase()}`; describe.each(clients)('using $name', ({ create, queryMethod = 'query', onClose }) => { let client;