Make tests faster (#8737)
* Test changes * Make finding the test tile a little smarter
This commit is contained in:
@@ -6,15 +6,13 @@ using NUnit.Framework;
|
||||
using Robust.Shared.GameObjects;
|
||||
using Robust.Shared.IoC;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Physics;
|
||||
using Content.Server.Climbing;
|
||||
|
||||
namespace Content.IntegrationTests.Tests.GameObjects.Components.Movement
|
||||
{
|
||||
[TestFixture]
|
||||
[TestOf(typeof(ClimbableComponent))]
|
||||
[TestOf(typeof(ClimbingComponent))]
|
||||
public sealed class ClimbUnitTest : ContentIntegrationTest
|
||||
public sealed class ClimbUnitTest
|
||||
{
|
||||
private const string Prototypes = @"
|
||||
- type: entity
|
||||
@@ -35,14 +33,14 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Movement
|
||||
[Test]
|
||||
public async Task Test()
|
||||
{
|
||||
var options = new ServerIntegrationOptions{ExtraPrototypes = Prototypes};
|
||||
var server = StartServer(options);
|
||||
await using var pairTracker = await PoolManager.GetServerClient(new PoolSettings{NoClient = true, ExtraPrototypes = Prototypes});
|
||||
var server = pairTracker.Pair.Server;
|
||||
|
||||
EntityUid human;
|
||||
EntityUid table;
|
||||
ClimbingComponent climbing;
|
||||
|
||||
server.Assert(() =>
|
||||
await server.WaitAssertion(() =>
|
||||
{
|
||||
var mapManager = IoCManager.Resolve<IMapManager>();
|
||||
mapManager.CreateNewMapEntity(MapId.Nullspace);
|
||||
@@ -69,7 +67,7 @@ namespace Content.IntegrationTests.Tests.GameObjects.Components.Movement
|
||||
// climbing.IsClimbing = false;
|
||||
});
|
||||
|
||||
await server.WaitIdleAsync();
|
||||
await pairTracker.CleanReturnAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user