Fix tests

This commit is contained in:
Vera Aguilera Puerto
2021-12-09 11:34:47 +01:00
parent 8c351e5456
commit 3a9e1ff929
2 changed files with 4 additions and 2 deletions

View File

@@ -88,7 +88,7 @@ namespace Content.IntegrationTests.Tests
Logger.LogS(LogLevel.Debug, "EntityTest", $"Testing: {prototype.ID}"); Logger.LogS(LogLevel.Debug, "EntityTest", $"Testing: {prototype.ID}");
testEntity = entityMan.SpawnEntity(prototype.ID, testLocation); testEntity = entityMan.SpawnEntity(prototype.ID, testLocation);
server.RunTicks(2); server.RunTicks(2);
Assert.That(entityMan.GetComponent<MetaDataComponent>(testEntity).EntityInitialized); if(!entityMan.Deleted(testEntity))
entityMan.DeleteEntity(testEntity); entityMan.DeleteEntity(testEntity);
}, "Entity '{0}' threw an exception.", }, "Entity '{0}' threw an exception.",
prototype.ID); prototype.ID);

View File

@@ -33,6 +33,8 @@ namespace Content.IntegrationTests.Tests
var options = new ServerIntegrationOptions{ExtraPrototypes = Prototypes}; var options = new ServerIntegrationOptions{ExtraPrototypes = Prototypes};
var server = StartServer(options); var server = StartServer(options);
await server.WaitIdleAsync();
EntityUid generator = default; EntityUid generator = default;
var entityMan = server.ResolveDependency<IEntityManager>(); var entityMan = server.ResolveDependency<IEntityManager>();