I think this is the key solution to the race condition we were missing

This commit is contained in:
Dominion
2023-04-22 19:31:19 -04:00
parent 1f7872d224
commit 77154c9d9b
@@ -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());