Make tests faster (#8737)
* Test changes * Make finding the test tile a little smarter
This commit is contained in:
@@ -18,7 +18,7 @@ namespace Content.IntegrationTests.Tests.Disposal
|
||||
[TestOf(typeof(DisposalHolderComponent))]
|
||||
[TestOf(typeof(DisposalEntryComponent))]
|
||||
[TestOf(typeof(DisposalUnitComponent))]
|
||||
public sealed class DisposalUnitTest : ContentIntegrationTest
|
||||
public sealed class DisposalUnitTest
|
||||
{
|
||||
[Reflect(false)]
|
||||
private sealed class DisposalUnitTestSystem : EntitySystem
|
||||
@@ -127,9 +127,8 @@ namespace Content.IntegrationTests.Tests.Disposal
|
||||
[Test]
|
||||
public async Task Test()
|
||||
{
|
||||
var options = new ServerIntegrationOptions { ExtraPrototypes = Prototypes };
|
||||
var server = StartServer(options);
|
||||
await server.WaitIdleAsync();
|
||||
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true, ExtraPrototypes = Prototypes});
|
||||
var server = pairTracker.Pair.Server;
|
||||
|
||||
EntityUid human = default!;
|
||||
EntityUid wrench = default!;
|
||||
@@ -143,7 +142,7 @@ namespace Content.IntegrationTests.Tests.Disposal
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
// Spawn the entities
|
||||
var coordinates = GetMainEntityCoordinates(mapManager);
|
||||
var coordinates = PoolManager.GetMainEntityCoordinates(mapManager);
|
||||
human = entityManager.SpawnEntity("HumanDummy", coordinates);
|
||||
wrench = entityManager.SpawnEntity("WrenchDummy", coordinates);
|
||||
disposalUnit = entityManager.SpawnEntity("DisposalUnitDummy", coordinates);
|
||||
@@ -208,6 +207,7 @@ namespace Content.IntegrationTests.Tests.Disposal
|
||||
// Re-pressurizing
|
||||
Flush(unit, false);
|
||||
});
|
||||
await pairTracker.CleanReturnAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user