-
-
Notifications
You must be signed in to change notification settings - Fork 506
Open
Labels
Description
Based on some recent interactions on Discord and w/ JasperFx client work, here's a few ideas for improving integration testing w/ Marten:
- Have a testing time option that runs ResetAllData() on IHost startup, but always before the async daemon starts up. Use an extension on
IServiceCollection
so that plays well with Alba orWebApplicationFactory
overrides - Especially if not using Wolverine managed projection distribution, have a Marten equivalent to Wolverine's
RunWolverineInSoloMode()
to force the Marten async daemons to all run inSolo
mode for faster spin up and better behaved testing behavior - Either an improved
WaitForNonStaleProjectionDataAsync()
or yet another testing utility that acts a bit more like Wolverine'sTrackActivity()
that records both the progress and any errors that happen during the processing of projections and/or subscriptions while trying to finish the test. The impetus for this was helping folks who where seeingWaitForNonStaleProjectionDataAsync()
timeout because the projections were encountering errors, which don't necessarily get shown in some testing harness usages (looking at you xUnit hijacking the Console output). My vision here is something like Wolverine's message tracking that will blow up w/ a textual report of all exceptions that Wolverine encountered while testing so you can better understand what went wrong.
And of course, thinking about a grander vision where there's maybe a more unified JasperFx / Critter Stack way of centralizing the "I'm in Solo" mode configuration and also the generic tracking mode.
WillEhrendreich, Hawxy, erdtsieck and DaveOnBlocks