Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ejsmith committed Dec 17, 2024
1 parent a7f3c46 commit f91004d
Showing 1 changed file with 2 additions and 19 deletions.
21 changes: 2 additions & 19 deletions tests/Exceptionless.Tests/TestWithServices.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand All @@ -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<TService>() where TService : class
Expand Down Expand Up @@ -98,9 +82,8 @@ private IServiceProvider CreateContainer()
return services.BuildServiceProvider();
}

public Task DisposeAsync()
public void Dispose()
{
_timeProvider.Restore();
return Task.CompletedTask;
}
}

0 comments on commit f91004d

Please sign in to comment.