Make tests faster (#8737)
* Test changes * Make finding the test tile a little smarter
This commit is contained in:
@@ -10,7 +10,7 @@ namespace Content.IntegrationTests.Tests.Utility
|
||||
{
|
||||
[TestFixture]
|
||||
[TestOf(typeof(EntityWhitelist))]
|
||||
public sealed class EntityWhitelistTest : ContentIntegrationTest
|
||||
public sealed class EntityWhitelistTest
|
||||
{
|
||||
private const string InvalidComponent = "Sprite";
|
||||
private const string ValidComponent = "Physics";
|
||||
@@ -60,16 +60,15 @@ namespace Content.IntegrationTests.Tests.Utility
|
||||
[Test]
|
||||
public async Task Test()
|
||||
{
|
||||
var serverOptions = new ServerContentIntegrationOption {ExtraPrototypes = Prototypes};
|
||||
var server = StartServer(serverOptions);
|
||||
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true, ExtraPrototypes = Prototypes});
|
||||
var server = pairTracker.Pair.Server;
|
||||
|
||||
await server.WaitIdleAsync();
|
||||
var mapManager = server.ResolveDependency<IMapManager>();
|
||||
var sEntities = server.ResolveDependency<IEntityManager>();
|
||||
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
var mapId = GetMainMapId(mapManager);
|
||||
var mapId = PoolManager.GetMainGrid(mapManager).ParentMapId;
|
||||
var mapCoordinates = new MapCoordinates(0, 0, mapId);
|
||||
|
||||
var validComponent = sEntities.SpawnEntity("ValidComponentDummy", mapCoordinates);
|
||||
@@ -110,6 +109,7 @@ namespace Content.IntegrationTests.Tests.Utility
|
||||
Assert.That(whitelistSer.IsValid(invalidComponent), Is.False);
|
||||
Assert.That(whitelistSer.IsValid(invalidTag), Is.False);
|
||||
});
|
||||
await pairTracker.CleanReturnAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user