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:
@@ -1,5 +1,5 @@
|
||||
using Akka.Hosting;
|
||||
using Akka.TestKit.Xunit2;
|
||||
using Akka.TestKit.Xunit;
|
||||
using Grpc.Core;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Logging.Abstractions;
|
||||
@@ -53,7 +53,7 @@ public sealed class CentralCommandGrpcServiceTests : TestKit
|
||||
|
||||
response.ShouldNotBeNull();
|
||||
|
||||
var received = probe.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(3));
|
||||
var received = probe.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(3), cancellationToken: TestContext.Current.CancellationToken);
|
||||
received.DeploymentId.ShouldBe(DeploymentId.Parse(request.DeploymentId));
|
||||
received.NodeId.Value.ShouldBe("site-a-1");
|
||||
received.Outcome.ShouldBe(ApplyAckOutcome.Failed);
|
||||
@@ -73,12 +73,12 @@ public sealed class CentralCommandGrpcServiceTests : TestKit
|
||||
var service = Service(registry);
|
||||
|
||||
await service.ReportApply(WellFormed(), new FakeServerCallContext());
|
||||
probe.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(3)).FailureReason.ShouldBeNull();
|
||||
probe.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(3), cancellationToken: TestContext.Current.CancellationToken).FailureReason.ShouldBeNull();
|
||||
|
||||
var blank = WellFormed();
|
||||
blank.FailureReason = "";
|
||||
await service.ReportApply(blank, new FakeServerCallContext());
|
||||
probe.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(3)).FailureReason.ShouldBe("");
|
||||
probe.ExpectMsg<ApplyAck>(TimeSpan.FromSeconds(3), cancellationToken: TestContext.Current.CancellationToken).FailureReason.ShouldBe("");
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -109,7 +109,7 @@ public sealed class CentralCommandGrpcServiceTests : TestKit
|
||||
Service(registry).ReportApply(request, new FakeServerCallContext()));
|
||||
|
||||
ex.StatusCode.ShouldBe(StatusCode.InvalidArgument);
|
||||
probe.ExpectNoMsg(TimeSpan.FromMilliseconds(300));
|
||||
probe.ExpectNoMsg(TimeSpan.FromMilliseconds(300), TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -126,7 +126,7 @@ public sealed class CentralCommandGrpcServiceTests : TestKit
|
||||
Service(registry).ReportApply(request, new FakeServerCallContext()));
|
||||
|
||||
ex.StatusCode.ShouldBe(StatusCode.InvalidArgument);
|
||||
probe.ExpectNoMsg(TimeSpan.FromMilliseconds(300));
|
||||
probe.ExpectNoMsg(TimeSpan.FromMilliseconds(300), TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
@@ -145,7 +145,7 @@ public sealed class CentralCommandGrpcServiceTests : TestKit
|
||||
Service(registry).ReportApply(request, new FakeServerCallContext()));
|
||||
|
||||
ex.StatusCode.ShouldBe(StatusCode.InvalidArgument);
|
||||
probe.ExpectNoMsg(TimeSpan.FromMilliseconds(300));
|
||||
probe.ExpectNoMsg(TimeSpan.FromMilliseconds(300), TestContext.Current.CancellationToken);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
|
||||
Reference in New Issue
Block a user