test: migrate AdminUI/ControlPlane/Runtime/Host tests to xunit.v3 (#756)
v2-ci / unit-tests (push) Failing after 13m22s

Akka.TestKit.Xunit2 -> Akka.TestKit.Xunit 1.5.62 (xunit.v3 TestKit; needs xunit.v3 3.2.2, set via
VersionOverride on the four projects). Removes the xunit 2.9.3 pin. IAsyncLifetime returns ValueTask,
SqlServerFactAttribute gains the source-info ctor, and xUnit1051 call sites pass
TestContext.Current.CancellationToken. Test counts unchanged.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-10 08:57:33 -05:00
parent 2a8e2981fe
commit b211911f98
191 changed files with 2161 additions and 2166 deletions
@@ -55,7 +55,7 @@ public sealed class DriverHostActorDirectApplyReadFailureTests : RuntimeActorTes
// Barrier: an answered GetDiagnostics proves PreStart (and its bootstrap ConfigDb read) is done,
// so the allowance below counts only the apply's own contexts.
actor.Tell(new GetDiagnostics(CorrelationId.NewId()), coordinator.Ref);
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(Timeout);
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(Timeout, cancellationToken: TestContext.Current.CancellationToken);
// Let ONE more context through — the apply's Applying-row upsert — and fail the NEXT one, which is
// the artifact read. Both misconfigurations fail LOUDLY rather than passing vacuously: too small
@@ -65,22 +65,22 @@ public sealed class DriverHostActorDirectApplyReadFailureTests : RuntimeActorTes
actor.Tell(new DispatchDeployment(deploymentId, RevA, CorrelationId.NewId()));
var ack = coordinator.ExpectMsg<ApplyAck>(Timeout);
var ack = coordinator.ExpectMsg<ApplyAck>(Timeout, cancellationToken: TestContext.Current.CancellationToken);
ack.Outcome.ShouldBe(ApplyAckOutcome.Failed);
ack.FailureReason.ShouldNotBeNullOrWhiteSpace();
db.Throws.ShouldBe(1); // the failure came from the read, not from somewhere incidental
// Never applied ⇒ never claimed: the node stays on what it was already serving.
actor.Tell(new GetDiagnostics(CorrelationId.NewId()), coordinator.Ref);
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(Timeout).CurrentRevision.ShouldNotBe(RevA);
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(Timeout, cancellationToken: TestContext.Current.CancellationToken).CurrentRevision.ShouldNotBe(RevA);
// …and because the revision did not advance, re-dispatching THE SAME revision against a healthy DB
// is not waved through by the "already at this rev" short-circuit — it actually applies.
actor.Tell(new DispatchDeployment(deploymentId, RevA, CorrelationId.NewId()));
coordinator.ExpectMsg<ApplyAck>(Timeout).Outcome.ShouldBe(ApplyAckOutcome.Applied);
coordinator.ExpectMsg<ApplyAck>(Timeout, cancellationToken: TestContext.Current.CancellationToken).Outcome.ShouldBe(ApplyAckOutcome.Applied);
actor.Tell(new GetDiagnostics(CorrelationId.NewId()), coordinator.Ref);
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(Timeout).CurrentRevision.ShouldBe(RevA);
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(Timeout, cancellationToken: TestContext.Current.CancellationToken).CurrentRevision.ShouldBe(RevA);
}
/// <summary>Seeds a sealed, parseable deployment and returns its id.</summary>