From 11ea972cd34518e63120a19cd37c29496b53712b Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Wed, 11 Nov 2026 15:38:08 -0500 Subject: [PATCH] test(adminui): #871 reaper not-a-guid database name unique per run The fixed name lives on the SQL Server shared by every checkout and CI, so a concurrent run's create or finally-drop could collide (failed once in the local pre-push suite, 3/3 green on rerun; cause plausible, not proven). Claude-Session: https://claude.ai/code/session_01GT67AD99zQQqpLCVm3p7xk --- .../SqlTestDatabaseReaperTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/SqlTestDatabaseReaperTests.cs b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/SqlTestDatabaseReaperTests.cs index 92d676755..64b453b04 100644 --- a/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/SqlTestDatabaseReaperTests.cs +++ b/tests/Server/ZB.MOM.WW.OtOpcUa.AdminUI.Tests/SqlTestDatabaseReaperTests.cs @@ -103,7 +103,9 @@ public sealed class SqlTestDatabaseReaperTests // what bounds the character set of every candidate: without it a database named // "_" + arbitrary text would be fed to the drop statement, and before the // statement was parameterised that was a second-order injection running as sa. - var notAGuid = $"{AdminUiSqlServer.TestDatabasePrefix}20250101000000_notaguid"; + // Unique per run: the SQL Server is shared by every checkout and CI, and a fixed name collided with a + // concurrent run's create / finally-drop. Digits only after "notaguid_", so it can never parse as a GUID. + var notAGuid = $"{AdminUiSqlServer.TestDatabasePrefix}20250101000000_notaguid_{Environment.ProcessId}_{Random.Shared.Next(1_000_000)}"; CreateDatabase(master, notAGuid);