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?