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:
+7
-7
@@ -31,10 +31,10 @@ public sealed class DriverHostActorHistoryUpdateRoleViewTests : RuntimeActorTest
|
||||
var view = new RecordingHistoryUpdateRoleView();
|
||||
var host = SpawnHost(view, () => 1);
|
||||
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
host.Tell(Snapshot(RedundancyRole.Primary));
|
||||
AwaitAssert(() => view.Published[^1].ShouldBeTrue(), duration: Timeout);
|
||||
AwaitAssert(() => view.Published[^1].ShouldBeTrue(), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>Once a snapshot has arrived, an unknown role on a single-driver cluster (a snapshot that omits this
|
||||
@@ -44,10 +44,10 @@ public sealed class DriverHostActorHistoryUpdateRoleViewTests : RuntimeActorTest
|
||||
{
|
||||
var view = new RecordingHistoryUpdateRoleView();
|
||||
var host = SpawnHost(view, () => 1);
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
host.Tell(new RedundancyStateChanged([], CorrelationId.NewId()));
|
||||
AwaitAssert(() => view.Published[^1].ShouldBeTrue(), duration: Timeout);
|
||||
AwaitAssert(() => view.Published[^1].ShouldBeTrue(), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>A Secondary stays closed after its snapshot; becoming Primary opens it.</summary>
|
||||
@@ -56,14 +56,14 @@ public sealed class DriverHostActorHistoryUpdateRoleViewTests : RuntimeActorTest
|
||||
{
|
||||
var view = new RecordingHistoryUpdateRoleView();
|
||||
var host = SpawnHost(view, () => 2);
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
host.Tell(Snapshot(RedundancyRole.Secondary));
|
||||
AwaitAssert(() => view.Published.Count.ShouldBeGreaterThanOrEqualTo(2), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.Count.ShouldBeGreaterThanOrEqualTo(2), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
view.Published.ShouldAllBe(v => !v);
|
||||
|
||||
host.Tell(Snapshot(RedundancyRole.Primary));
|
||||
AwaitAssert(() => view.Published[^1].ShouldBeTrue(), duration: Timeout);
|
||||
AwaitAssert(() => view.Published[^1].ShouldBeTrue(), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>The policy itself: no snapshot ⇒ closed whatever the role/count; with one ⇒ the data-plane verdict.</summary>
|
||||
|
||||
Reference in New Issue
Block a user