diff --git a/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/SessionWorkerClientFactoryFakeWorkerTests.cs b/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/SessionWorkerClientFactoryFakeWorkerTests.cs index baeb902..c8f7047 100644 --- a/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/SessionWorkerClientFactoryFakeWorkerTests.cs +++ b/src/ZB.MOM.WW.MxGateway.Tests/Gateway/Sessions/SessionWorkerClientFactoryFakeWorkerTests.cs @@ -11,7 +11,7 @@ using ZB.MOM.WW.MxGateway.Tests.TestSupport; namespace ZB.MOM.WW.MxGateway.Tests.Gateway.Sessions; -public sealed class SessionWorkerClientFactoryFakeWorkerTests : IAsyncDisposable +public sealed class SessionWorkerClientFactoryFakeWorkerTests : IAsyncLifetime { private static readonly TimeSpan TestTimeout = TimeSpan.FromSeconds(5); @@ -24,12 +24,19 @@ public sealed class SessionWorkerClientFactoryFakeWorkerTests : IAsyncDisposable private readonly List _launchers = []; + /// + public Task InitializeAsync() => Task.CompletedTask; + /// /// Awaits every scripted worker task so an unhandled exception fails the owning test /// instead of surfacing later as an unobserved . + /// This must stay on : xUnit v2 never invokes + /// on a test class, so under the previous + /// declaration this teardown silently never ran (the NeverReady launcher's parked infinite + /// delay was still pending in a post-run process dump). /// /// A task that represents the asynchronous operation. - public async ValueTask DisposeAsync() + public async Task DisposeAsync() { foreach (IWorkerTaskLauncher launcher in _launchers) {