From 77154c9d9b39bc6fcdff25f9898b3cdf6a98d8e8 Mon Sep 17 00:00:00 2001 From: Dominion Date: Sat, 22 Apr 2023 19:31:19 -0400 Subject: [PATCH] I think this is the key solution to the race condition we were missing --- tests/Tgstation.Server.Host.Tests/Swarm/TestSwarmProtocol.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/Tgstation.Server.Host.Tests/Swarm/TestSwarmProtocol.cs b/tests/Tgstation.Server.Host.Tests/Swarm/TestSwarmProtocol.cs index 7f480ab142..63d348080a 100644 --- a/tests/Tgstation.Server.Host.Tests/Swarm/TestSwarmProtocol.cs +++ b/tests/Tgstation.Server.Host.Tests/Swarm/TestSwarmProtocol.cs @@ -6,6 +6,7 @@ using Microsoft.Extensions.Logging; using Microsoft.VisualStudio.TestTools.UnitTesting; using Tgstation.Server.Host.Configuration; +using Tgstation.Server.Host.Core; namespace Tgstation.Server.Host.Swarm.Tests { @@ -176,6 +177,9 @@ namespace Tgstation.Server.Host.Swarm.Tests TestableSwarmNode.Link(controller, node1); + controller.UpdateResult = ServerUpdateResult.UpdateInProgress; + node1.UpdateResult = ServerUpdateResult.UpdateInProgress; + Assert.AreEqual(SwarmRegistrationResult.Success, await controller.TryInit()); Assert.AreEqual(SwarmRegistrationResult.Success, await node1.TryInit());