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:
@@ -48,7 +48,7 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
})
|
||||
.Build();
|
||||
|
||||
await host.StartAsync();
|
||||
await host.StartAsync(TestContext.Current.CancellationToken);
|
||||
try
|
||||
{
|
||||
var driverHost = host.Services.GetRequiredService<IRequiredActor<DriverHostActorKey>>();
|
||||
@@ -73,7 +73,7 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
}
|
||||
finally
|
||||
{
|
||||
await host.StopAsync();
|
||||
await host.StopAsync(TestContext.Current.CancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -86,7 +86,7 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
{
|
||||
using var host = BuildRuntimeActorHost(extra: null);
|
||||
|
||||
await host.StartAsync();
|
||||
await host.StartAsync(TestContext.Current.CancellationToken);
|
||||
try
|
||||
{
|
||||
var registry = host.Services.GetRequiredService<ActorRegistry>();
|
||||
@@ -94,7 +94,7 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
}
|
||||
finally
|
||||
{
|
||||
await host.StopAsync();
|
||||
await host.StopAsync(TestContext.Current.CancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -112,7 +112,7 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
services.AddSingleton<IHistorizationOutbox>(new FakeOutbox());
|
||||
});
|
||||
|
||||
await host.StartAsync();
|
||||
await host.StartAsync(TestContext.Current.CancellationToken);
|
||||
try
|
||||
{
|
||||
var recorder = host.Services.GetRequiredService<IRequiredActor<ContinuousHistorizationRecorderKey>>();
|
||||
@@ -121,7 +121,7 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
}
|
||||
finally
|
||||
{
|
||||
await host.StopAsync();
|
||||
await host.StopAsync(TestContext.Current.CancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,7 +156,7 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
});
|
||||
});
|
||||
|
||||
await host.StartAsync();
|
||||
await host.StartAsync(TestContext.Current.CancellationToken);
|
||||
try
|
||||
{
|
||||
var driverHost = host.Services.GetRequiredService<IRequiredActor<DriverHostActorKey>>();
|
||||
@@ -171,13 +171,13 @@ public sealed class ServiceCollectionExtensionsTests
|
||||
// never completes.
|
||||
var deadline = DateTime.UtcNow.AddSeconds(15);
|
||||
while (sender.Sent.Count == 0 && DateTime.UtcNow < deadline)
|
||||
await Task.Delay(50);
|
||||
await Task.Delay(50, TestContext.Current.CancellationToken);
|
||||
|
||||
sender.Sent.Count.ShouldBe(1);
|
||||
}
|
||||
finally
|
||||
{
|
||||
await host.StopAsync();
|
||||
await host.StopAsync(TestContext.Current.CancellationToken);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user