Make tests faster (#8737)

* Test changes

* Make finding the test tile a little smarter
This commit is contained in:
wrexbe
2022-06-19 20:22:28 -07:00
committed by GitHub
parent bd54b8de25
commit 81e3b2da88
80 changed files with 1769 additions and 1788 deletions

View File

@@ -13,17 +13,13 @@ using static Content.IntegrationTests.Tests.Destructible.DestructibleTestPrototy
namespace Content.IntegrationTests.Tests.Destructible
{
public sealed class DestructibleDestructionTest : ContentIntegrationTest
public sealed class DestructibleDestructionTest
{
[Test]
public async Task Test()
{
var server = StartServer(new ServerContentIntegrationOption
{
ExtraPrototypes = Prototypes
});
await server.WaitIdleAsync();
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true, ExtraPrototypes = Prototypes});
var server = pairTracker.Pair.Server;
var sEntityManager = server.ResolveDependency<IEntityManager>();
var sMapManager = server.ResolveDependency<IMapManager>();
@@ -35,8 +31,7 @@ namespace Content.IntegrationTests.Tests.Destructible
await server.WaitPost(() =>
{
var gridId = GetMainGrid(sMapManager).GridEntityId;
var coordinates = new EntityCoordinates(gridId, 0, 0);
var coordinates = PoolManager.GetMainEntityCoordinates(sMapManager);
sDestructibleEntity = sEntityManager.SpawnEntity(DestructibleDestructionEntityId, coordinates);
sTestThresholdListenerSystem = sEntitySystemManager.GetEntitySystem<TestDestructibleListenerSystem>();
@@ -87,6 +82,7 @@ namespace Content.IntegrationTests.Tests.Destructible
Assert.That(found, Is.True);
});
await pairTracker.CleanReturnAsync();
}
}
}