❔ WebApplicationFactory and Minimal-APIs
I've got problems with my integration tests and minimal apis.
My app has a worker services that start right up when the actual api is starting.
I have a custom
My problem though: With the top level statements and the builder that minimal apis use it looks like the app is completely started and in parallel the builder of the
I've never faced these issues in the traditional
My app has a worker services that start right up when the actual api is starting.
I have a custom
WebApplicationFactory that will swap out the Database with one thats started by Testcontainers.My problem though: With the top level statements and the builder that minimal apis use it looks like the app is completely started and in parallel the builder of the
WebApplicationFactory runs. My worker service crashes though, as it get's started before my custom WebApplicationFactory finishes with changing out the db.I've never faced these issues in the traditional
Startup era, so can I use WebApplicationFactory properly with top level statements?