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
This commit is contained in:
@@ -103,7 +103,9 @@ public sealed class SqlTestDatabaseReaperTests
|
||||
// what bounds the character set of every candidate: without it a database named
|
||||
// "<prefix><aged timestamp>_" + 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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user