From 878a684260d1e536455a65ea90358fe6440ce9ed Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Fri, 23 Jun 2023 12:54:24 +1200 Subject: [PATCH] Maybe fix more mind test failures (#17577) --- .../Tests/Minds/MindTests.EntityDeletion.cs | 2 +- Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs index 32e6d3d273..765036eb50 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.EntityDeletion.cs @@ -68,7 +68,7 @@ public sealed partial class MindTests [Test] public async Task TestGhostOnDeleteMap() { - await using var pairTracker = await PoolManager.GetServerClient(); + await using var pairTracker = await SetupPair(); var server = pairTracker.Pair.Server; var testMap = await PoolManager.CreateTestMap(pairTracker); var coordinates = testMap.GridCoords; diff --git a/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs b/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs index b3b77451fe..f3fed7ea7b 100644 --- a/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs +++ b/Content.IntegrationTests/Tests/Minds/MindTests.Helpers.cs @@ -37,16 +37,17 @@ public sealed partial class MindTests var player = playerMan.ServerSessions.Single(); EntityUid entity = default; + Mind mind = default!; await pair.Server.WaitPost(() => { entity = entMan.SpawnEntity(null, MapCoordinates.Nullspace); - mindSys.TransferTo(mindSys.CreateMind(player.UserId), entity); + mind = mindSys.CreateMind(player.UserId); + mindSys.TransferTo(mind, entity); }); await PoolManager.RunTicksSync(pair, 5); - var mind = player.ContentData()?.Mind; - Assert.NotNull(mind); + Assert.That(player.ContentData()?.Mind, Is.EqualTo(mind)); Assert.That(player.AttachedEntity, Is.EqualTo(entity)); Assert.That(player.AttachedEntity, Is.EqualTo(mind.CurrentEntity), "Player is not attached to the mind's current entity."); Assert.That(entMan.EntityExists(mind.OwnedEntity), "The mind's current entity does not exist");