From 95a13952352b6b375cf64386b83c10d3c47f6bdf Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 14:25:38 +0200 Subject: [PATCH] ThrustAllocationTests: heat the degraded drive stepwise; report the drift The commit does not claim a green run; both tests were red in the previous run. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs b/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs index bba7d64c7..a3de52005 100644 --- a/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs +++ b/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs @@ -92,8 +92,11 @@ public sealed partial class RunStartTests // The drive is heated a little off its plateau: its live thrust moves, and a column cached before would not. var weakened = drives[^1]; var before = weakened.Thrust; - foreach (var cell in weakened.Item.InsetShape.Coordinates) player.Temperature[cell.x, cell.y] += 5f; - weakened.Item.UpdatePerformance(); + for (var step = 0; step < 20 && weakened.Thrust > before * .9f; step++) + { + foreach (var cell in weakened.Item.InsetShape.Coordinates) player.Temperature[cell.x, cell.y] += 2f; + weakened.Item.UpdatePerformance(); + } Assert.True(weakened.Thrust < before * .95f && weakened.Item.Active.Value, "fixture: the heated drive pushes measurably less"); Assert.True(abs(AllocFly(player, 60)) < .1f); } @@ -124,7 +127,8 @@ public sealed partial class RunStartTests ship.MovementDirection = float2(0, 1); ship.Turn = 0; - Assert.True(abs(AllocFly(ship, 600)) < .05f); + var drift = AllocFly(ship, 600); + Assert.True(abs(drift) < .05f, $"heading changed {drift} deg; drives {string.Join(" ", drives.Select(d => $"{d.Thrust:F0}/{d.Axis:F3}"))}"); } [Fact]