From d4ce92f1b43c7345d67eff06a1c3b9f5dd6054b4 Mon Sep 17 00:00:00 2001 From: Alexa <53471801+Alexa-RR@users.noreply.github.com> Date: Sun, 25 Oct 2026 16:55:57 +0200 Subject: [PATCH] test(auth): give sign-in test players sequential ids --- DorkNet.Server.Tests/ExternalSignInTests.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/DorkNet.Server.Tests/ExternalSignInTests.cs b/DorkNet.Server.Tests/ExternalSignInTests.cs index 562df61..a63de6a 100644 --- a/DorkNet.Server.Tests/ExternalSignInTests.cs +++ b/DorkNet.Server.Tests/ExternalSignInTests.cs @@ -23,6 +23,8 @@ namespace DorkNet.Server.Tests; public sealed class ExternalSignInTests : IClassFixture { private const string Issuer = "https://idp.example.com"; + // Test player ids: sequential, in a range no other test uses. + private static long _nextPlayerId = 9_600_000; private readonly DorkNetServerFactory _factory; public ExternalSignInTests(DorkNetServerFactory factory) => _factory = factory; @@ -200,7 +202,7 @@ public sealed class ExternalSignInTests : IClassFixture var password = "pw-" + Guid.NewGuid().ToString("N")[..12]; var player = new PlayerEntity { - Id = 9_400_000 + Random.Shared.Next(1, 99_999), + Id = Interlocked.Increment(ref _nextPlayerId), Username = "sso" + Guid.NewGuid().ToString("N")[..10], DisplayName = "SSO test", PasswordHash = BCrypt.Net.BCrypt.HashPassword(password),