JasperFx / marten

.NET Transactional Document DB and Event Store on PostgreSQL
https://martendb.io
MIT License
2.82k stars 445 forks source link

Improved Daemon automated testing experience #3227

Closed jeremydmiller closed 4 months ago

jeremydmiller commented 4 months ago

For test automation. It's very commonly helpful to stop and restart all projections/subscriptions. Give IProjectionCoordinator needs a StartAllAsync() and StopAllAsync() method.

Do this on the ResetAllData() as well.

IDocumentCleaner.DeleteAllEventDataAsync() is not correctly deleting the event progression, and that's kind of big deal! -- also have this method stop the daemon, and restart whatever was running before

Also add helpers to IHost for StartAllProjectionsAndSubscriptionsAsync() andStop****`

Maybe have a StartDaemonsAndWaitForNonStaleData()