You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The last comment in #2097 mentions that it should be fixed, but I'm still running into this issue when executing integration tests with a custom WebApplicationFactory. The service was simply registered using the WebApplicationBuilder (builder.Services.AddHangfireServer()).
I'm using version 1.8.17.
[Test Class Cleanup Failure (Foo.Tests.MyTest)]: System.ObjectDisposedException : Cannot access a disposed object.
Object name: 'Hangfire.Server.BackgroundProcessingServer'.
at Hangfire.Server.BackgroundProcessingServer.ThrowIfDisposed() in C:\projects\hangfire-525\src\Hangfire.Core\Server\BackgroundProcessingServer.cs:line 265
at Hangfire.Server.BackgroundProcessingServer.SendStop() in C:\projects\hangfire-525\src\Hangfire.Core\Server\BackgroundProcessingServer.cs:line 128
at Hangfire.BackgroundJobServer.SendStop() in C:\projects\hangfire-525\src\Hangfire.Core\BackgroundJobServer.cs:line 150
at Hangfire.BackgroundJobServerHostedService.StopAsync(CancellationToken cancellationToken) in C:\projects\hangfire-525\src\Hangfire.NetCore\BackgroundJobServerHostedService.cs:line 128
at Microsoft.Extensions.Hosting.Internal.Host.ForeachService[T](IEnumerable`1 services, CancellationToken token, Boolean concurrent, Boolean abortOnFirstException, List`1 exceptions, Func`3 operation)
at Microsoft.Extensions.Hosting.Internal.Host.StopAsync(CancellationToken cancellationToken)
at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.DisposeAsync()
at Foo.Tests.IntegrationTests.Tests.Base.TestApplicationFactory`1.DisposeAsync() in /azp/_work/1/s/tests/Foo.Tests/IntegrationTests/Tests/Base/TestApplicationFactory.cs:line 29
at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.Dispose(Boolean disposing)
at Microsoft.AspNetCore.Mvc.Testing.WebApplicationFactory`1.Dispose()
The text was updated successfully, but these errors were encountered:
The last comment in #2097 mentions that it should be fixed, but I'm still running into this issue when executing integration tests with a custom
WebApplicationFactory
. The service was simply registered using theWebApplicationBuilder
(builder.Services.AddHangfireServer()
).I'm using version 1.8.17.
The text was updated successfully, but these errors were encountered: