test: migrate AdminUI/ControlPlane/Runtime/Host tests to xunit.v3 (#756)
v2-ci / unit-tests (push) Failing after 13m22s
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:
+5
-5
@@ -54,7 +54,7 @@ public sealed class DriverHostActorDirectApplyOffMailboxTests : RuntimeActorTest
|
||||
// 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>(TimeSpan.FromSeconds(5));
|
||||
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(TimeSpan.FromSeconds(5), cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
// Let ONE more context through — the apply's Applying-row upsert, which is a deliberate
|
||||
// on-thread write (bounded, one row) — and block the next, which is the artifact read.
|
||||
@@ -66,20 +66,20 @@ public sealed class DriverHostActorDirectApplyOffMailboxTests : RuntimeActorTest
|
||||
actor.Tell(new DispatchDeployment(deploymentId, RevA, CorrelationId.NewId()));
|
||||
|
||||
// The read was entered and has NOT completed — the gate is still closed.
|
||||
AwaitAssert(() => db.Blocked.ShouldBe(1), duration: PresenceBudget);
|
||||
AwaitAssert(() => db.Blocked.ShouldBe(1), duration: PresenceBudget, cancellationToken: TestContext.Current.CancellationToken);
|
||||
db.Unblocked.ShouldBe(0);
|
||||
|
||||
// THE assertion: with the artifact read still in flight the host is still processing its
|
||||
// mailbox. Read inline on the actor thread, this times out.
|
||||
actor.Tell(new GetDiagnostics(CorrelationId.NewId()), coordinator.Ref);
|
||||
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(TimeSpan.FromSeconds(3));
|
||||
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(TimeSpan.FromSeconds(3), cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
// Releasing the read completes the apply exactly as before — same Applied ACK, same revision.
|
||||
db.Open();
|
||||
coordinator.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(10)).Outcome.ShouldBe(ApplyAckOutcome.Applied);
|
||||
coordinator.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(10), cancellationToken: TestContext.Current.CancellationToken).Outcome.ShouldBe(ApplyAckOutcome.Applied);
|
||||
|
||||
actor.Tell(new GetDiagnostics(CorrelationId.NewId()), coordinator.Ref);
|
||||
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(TimeSpan.FromSeconds(5)).CurrentRevision.ShouldBe(RevA);
|
||||
coordinator.ExpectMsg<NodeDiagnosticsSnapshot>(TimeSpan.FromSeconds(5), cancellationToken: TestContext.Current.CancellationToken).CurrentRevision.ShouldBe(RevA);
|
||||
}
|
||||
finally
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user