Testcontainers in integration tests vs BackgroundService
I have an issue with Testcontainers + WebApplicationFactory in integration test. I created my implementation of WebApplicationFactory implementing
IAsyncLifetime
from xUnit and I'm migrating my EF Core context in InitializeAsync
method. However, it is probably too late - one of my background services tries to access in StartAsync
(with ServiceProvider scope) db context to check some data and it results with an exception of "column ... does not exist". Is there any workaround for managing that problem?
code in comment1 Reply
code: