From 2bb85b6aeaea0074770287259dae5385236338d1 Mon Sep 17 00:00:00 2001 From: Jordan Dominion Date: Sun, 17 Dec 2023 18:17:21 -0500 Subject: [PATCH] Simpler test port allocation --- tests/Tgstation.Server.Tests/Live/TestLiveServer.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs b/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs index 8c81e5451d..6edee102ea 100644 --- a/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs +++ b/tests/Tgstation.Server.Tests/Live/TestLiveServer.cs @@ -147,8 +147,12 @@ namespace Tgstation.Server.Tests.Live static ushort FreeTcpPort(params ushort[] usedPorts) { + var portList = new ushort[] { 42069, 42070, 42071, 42072, 42073, 42074 }; + return portList.First(x => !usedPorts.Contains(x)); + /* ushort result; var listeners = new List(); + try { do @@ -177,6 +181,7 @@ namespace Tgstation.Server.Tests.Live } } return result; + */ } [ClassInitialize]