Fix broken tests directly mutating entities from wrong thread. (#31647)

* Fix broken tests directly mutating entities from wrong thread.

* fix build

* gundam

* stuff

---------

Co-authored-by: metalgearsloth <comedian_vs_clown@hotmail.com>
This commit is contained in:
Pieter-Jan Briers
2024-08-31 07:49:20 +02:00
committed by GitHub
parent 8ca4337bd8
commit 2d43bb6b38
2 changed files with 5 additions and 7 deletions

View File

@@ -253,12 +253,12 @@ public sealed class CargoTest
{
await using var pair = await PoolManager.GetServerClient();
var server = pair.Server;
var entManager = server.ResolveDependency<IEntityManager>();
var priceSystem = entManager.System<PricingSystem>();
await server.WaitAssertion(() =>
{
var priceSystem = entManager.System<PricingSystem>();
var ent = entManager.SpawnEntity("StackEnt", MapCoordinates.Nullspace);
var price = priceSystem.GetPrice(ent);
Assert.That(price, Is.EqualTo(100.0));