test: capture the preserved late-slope assertion explicitly

This commit is contained in:
Joseph Doherty
2026-11-10 17:50:55 -05:00
parent 5ea6a23f1b
commit 7f21c9aa64
@@ -186,9 +186,10 @@ public sealed partial class Sdk2LifecycleSoakTests
var original = new ShouldAssertException("original cold RSS rejection");
using var buffer = new MemoryStream();
await using var evidence = new StreamWriter(buffer, leaveOpen: true);
var error = await Should.ThrowAsync<ShouldAssertException>(() =>
run.EmitAndPreserveFailuresAsync(evidence, 1800, 450, 7201, ExceptionDispatchInfo.Capture(original)));
error.ShouldBeSameAs(original);
ShouldAssertException? observed = null;
try { await run.EmitAndPreserveFailuresAsync(evidence, 1800, 450, 7201, ExceptionDispatchInfo.Capture(original)); }
catch (ShouldAssertException error) { observed = error; }
observed.ShouldBeSameAs(original);
using var row = ReadSingleLateSlopeResult(buffer);
row.RootElement.GetProperty("durationCompleted").GetBoolean().ShouldBeTrue();
row.RootElement.GetProperty("fatalFailure").GetBoolean().ShouldBeFalse();