From f91004d304f2573115c3cd0a9f906e14ea548e94 Mon Sep 17 00:00:00 2001 From: "Eric J. Smith" Date: Tue, 17 Dec 2024 15:21:32 -0600 Subject: [PATCH] Cleanup --- tests/Exceptionless.Tests/TestWithServices.cs | 21 ++----------------- 1 file changed, 2 insertions(+), 19 deletions(-) diff --git a/tests/Exceptionless.Tests/TestWithServices.cs b/tests/Exceptionless.Tests/TestWithServices.cs index 29c4a2dc2..40011b395 100644 --- a/tests/Exceptionless.Tests/TestWithServices.cs +++ b/tests/Exceptionless.Tests/TestWithServices.cs @@ -18,11 +18,10 @@ namespace Exceptionless.Tests; -public class TestWithServices : TestWithLoggingBase, IAsyncLifetime +public class TestWithServices : TestWithLoggingBase, IDisposable { private readonly IServiceProvider _container; private readonly ProxyTimeProvider _timeProvider; - //private static bool _startupActionsRun; public TestWithServices(ITestOutputHelper output) : base(output) { @@ -38,21 +37,6 @@ public TestWithServices(ITestOutputHelper output) : base(output) else throw new InvalidOperationException("TimeProvider must be of type ProxyTimeProvider"); } - - public virtual Task InitializeAsync() - { - return Task.CompletedTask; - - /* - if (_startupActionsRun) - return; - - var result = await _container.RunStartupActionsAsync(); - if (!result.Success) - throw new ApplicationException($"Startup action \"{result.FailedActionName}\" failed"); - - _startupActionsRun = true;*/ - } protected ProxyTimeProvider TimeProvider => _timeProvider; protected TService GetService() where TService : class @@ -98,9 +82,8 @@ private IServiceProvider CreateContainer() return services.BuildServiceProvider(); } - public Task DisposeAsync() + public void Dispose() { _timeProvider.Restore(); - return Task.CompletedTask; } }