diff --git a/TerrariaServerAPI.Tests/BaseTest.cs b/TerrariaServerAPI.Tests/BaseTest.cs index 31b4912b..1f740732 100644 --- a/TerrariaServerAPI.Tests/BaseTest.cs +++ b/TerrariaServerAPI.Tests/BaseTest.cs @@ -12,20 +12,21 @@ public class BaseTest [OneTimeSetUp] public void EnsureInitialised() { + TestContext.Out.WriteLine($"Test architecture {RuntimeInformation.ProcessArchitecture}"); + if (!_initialized) { - var are = new AutoResetEvent(false); + AutoResetEvent are = new(false); Exception? error = null; - HookEvents.HookDelegate cb = (instance, args) => + HookEvents.HookDelegate cb = (instance, args) => { instance.Initialize(); are.Set(); _initialized = true; - Console.WriteLine($"Server init process successful for architecture {RuntimeInformation.ProcessArchitecture}"); }; HookEvents.Terraria.Main.DedServ += cb; - global::TerrariaApi.Server.Program.Main(new string[] { }); + global::TerrariaApi.Server.Program.Main([]); _initialized = are.WaitOne(TimeSpan.FromSeconds(30));