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
@@ -52,7 +52,7 @@ public sealed class DriverHostActorRoleViewTests : RuntimeActorTestBase
|
||||
{
|
||||
var view = SpawnAndTellRole(RedundancyRole.Secondary, driverMemberCount: 2);
|
||||
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([false]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -73,7 +73,7 @@ public sealed class DriverHostActorRoleViewTests : RuntimeActorTestBase
|
||||
],
|
||||
CorrelationId.NewId()));
|
||||
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -82,7 +82,7 @@ public sealed class DriverHostActorRoleViewTests : RuntimeActorTestBase
|
||||
var view = SpawnAndTellRole(RedundancyRole.Primary, driverMemberCount: 2);
|
||||
|
||||
// Published, not current — `true` is the seed. See the note in the unknown-role theory.
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -118,7 +118,7 @@ public sealed class DriverHostActorRoleViewTests : RuntimeActorTestBase
|
||||
// first poll — before the actor has processed the snapshot — and therefore passes just as
|
||||
// happily when the publish is wrong or absent. Verified: with the old write-gate verdict
|
||||
// restored, the current-value form stayed green and only this form goes red.
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>A demotion must move the view, not just an initial promotion.</summary>
|
||||
@@ -129,10 +129,10 @@ public sealed class DriverHostActorRoleViewTests : RuntimeActorTestBase
|
||||
var host = SpawnHost(view, driverMemberCount: 2);
|
||||
|
||||
host.Tell(Snapshot(TestNode, RedundancyRole.Primary));
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([true]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
|
||||
host.Tell(Snapshot(TestNode, RedundancyRole.Secondary));
|
||||
AwaitAssert(() => view.Published.ShouldBe([true, false]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([true, false]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -167,7 +167,7 @@ public sealed class DriverHostActorRoleViewTests : RuntimeActorTestBase
|
||||
],
|
||||
CorrelationId.NewId()));
|
||||
|
||||
AwaitAssert(() => view.Published.ShouldBe([expected]), duration: Timeout);
|
||||
AwaitAssert(() => view.Published.ShouldBe([expected]), duration: Timeout, cancellationToken: TestContext.Current.CancellationToken);
|
||||
Sys.Stop(host);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user