Integration and Unit Test

In the standard unit test project that ServiceStack provides in the template, I have multiple integration test files but the test runners are constantly reporting

OneTimeSetUp: System.ObjectDisposedException : Cannot access a disposed object.
Object name: ‘LoggerFactory’.
Exception doesn’t have a stacktrace

I’ve narrowed it down to the AppHost.Configure in the test project to where I’m starting the backgroundmqservice

    container.Register<IMessageService>(c => new BackgroundMqService());
    var mqServer = container.Resolve<IMessageService>();
    mqServer.RegisterHandler<SendSystemEmail>(ExecuteMessage);

    mqServer.Start();

It works fine for the first test but every other test file fails with the error message above regarding the LoggerFactory, but if i comment out the registering of the handler it the tests work perfectly?

Can publish a stand-alone repro to a GitHub project, we’re running BackgroundMqService in the existing MQ Integration tests without issue.

Just ran into this issue myself, which is now resolved from v5.6.1 that’s now available on MyGet.