Maybe fix more mind test failures (#17577)

This commit is contained in:
Leon Friedrich 2023-06-23 12:54:24 +12:00 committed by GitHub
parent 95d6f828e0
commit 878a684260
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

View File

@ -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;

View File

@ -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");