test: align abandoned continuation count across close controls

This commit is contained in:
Joseph Doherty
2026-11-10 16:36:29 -05:00
parent 6737e367b4
commit 564f109143
@@ -176,10 +176,17 @@ public sealed partial class Sdk2LifecycleSoakTests
var oldAuthentication = authenticationProperty.GetValue(old).ShouldBeOfType<NodeId>();
oldAuthentication.IsNull.ShouldBeFalse();
var browse = await BrowseAsync(old, ct);
var history = (await PageAsync(old, default, false, ct)).ContinuationPoint;
ByteString history = default;
for (var i = 0; i < 6; i++)
{
var point = (await PageAsync(old, default, false, ct)).ContinuationPoint;
point.IsEmpty.ShouldBeFalse();
if (i == 0) history = point;
}
browse.IsEmpty.ShouldBeFalse(); history.IsEmpty.ShouldBeFalse();
var serverSession = rig.Server.CurrentInstance.SessionManager.GetSessions().Single();
var points = serverSession.ContinuationPoints;
ContinuationCounts(serverSession).ShouldBe((1, 6));
var weak = new List<WeakTarget>
{
new("closed-client-session", new(old)), new("closed-server-session", new(serverSession)),
@@ -221,7 +228,8 @@ public sealed partial class Sdk2LifecycleSoakTests
await OwnPointsRoundTripAsync(fresh, ct);
await fresh.CloseAsync(ct).WaitAsync(TimeSpan.FromSeconds(10), ct);
rig.Server.CurrentInstance.SessionManager.GetSessions().ShouldBeEmpty();
WriteCloseControl("wire-contract", new { oldAuthStatus = failure.StatusCode.Code, oldBrowseRejected = true, oldHistoryRejected = true, freshPositiveRounds = 2 });
WriteCloseControl("wire-contract", new { oldAuthStatus = failure.StatusCode.Code, oldBrowseRejected = true, oldHistoryRejected = true,
abandonedBrowse = 1, abandonedHistory = 6, freshPositiveRounds = 2 });
return weak.ToArray();
}