Adopt the lifted JasperFx.Events ProjectionScenario - #5133
Merged
Conversation
Consumes the cross-store lift in #616. Marten's Events/TestSupport goes from seven files of harness to one ~70-line subclass that only supplies the store-specific seam: DeleteExistingDataAsync, HasAnyAsyncProjections, BuildDaemonAsync, OpenSession, SaveChangesAsync, EventsFor, and the object-id LoadDocumentAsync dispatch (the same switch MartenComplianceFixture already carries). All scripting and execution behavior -- step queueing, batched commits, the marten#5126 trailing flush, action fail-fast, the re-execution guard, daemon lifecycle, Timeout -- now lives on the shared base type. The public API a user touches is unchanged from #5132 apart from Execute -> ExecuteAsync, and the two exception types moving from Marten.Events.TestSupport to JasperFx.Events.TestSupport. DocumentShouldExist/DocumentShouldNotExist now take object ids on the base type instead of four typed overloads each. Existing typed call sites keep compiling. BLOCKED: the JasperFx/JasperFx.Events 2.38.0 pin here is the *intended* published version -- #616 is open, not merged or published. This branch was built and tested against a local pack of that branch and must be re-verified against the real package before merge. net9.0: DaemonTests scenario suite 15/15, CoreTests exception convention green, full Marten.slnx builds clean. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
jeremydmiller
marked this pull request as ready for review
August 3, 2026 13:05
jeremydmiller
force-pushed
the
feat/5127-scenario-lift
branch
from
August 3, 2026 13:05
85fa79f to
fddbe94
Compare
Member
Author
|
Rebased onto master now that JasperFx.Events 2.38.0 is published and #5135 has landed. The Re-verified against the published package rather than the local pack this was originally proven with: full 🤖 Generated with Claude Code |
29 tasks
This was referenced Aug 4, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #5127 / #5132. Consumes the cross-store lift in JasperFx/jasperfx#616.
Important
Draft: this will not go green until JasperFx.Events 2.38.0 is published. The
Directory.Packages.propspin here is the intended published version — #616 is open, not merged. The branch was built and tested against a local pack of that branch; it needs re-verification against the real package before this leaves draft.What changes
Marten's
Events/TestSupportgoes from seven files of harness to a single ~70-line subclass. Everything about how a scenario behaves — step queueing, batched commits, the #5126 trailing flush, action fail-fast, the re-execution guard, daemon lifecycle,Timeout— now lives on the sharedProjectionScenario<TOperations, TQuerySession>base type inJasperFx.Events.TestSupport.What's left in Marten is only the store-specific seam:
DeleteExistingDataAsync,HasAnyAsyncProjections,BuildDaemonAsync,OpenSession,SaveChangesAsync,EventsFor, and theobject-idLoadDocumentAsyncdispatch — the same switchMartenComplianceFixturealready carries. Net −692 / +51 lines.API impact
Small, and on top of the already-breaking #5132:
scenario.Execute(ct)→scenario.ExecuteAsync(ct).ProjectionScenarioExceptionandProjectionScenarioAssertionExceptionmove fromMarten.Events.TestSupporttoJasperFx.Events.TestSupport. Test code that catches either needs the newusing.DocumentShouldExist<T>/DocumentShouldNotExist<T>now takeobjectids on the base type instead of four typed overloads each. Existing typed call sites keep compiling — everything converts toobject.Everything else a user touches is unchanged from #5132.
Verification (against a local pack of #616)
Marten.slnxbuilds clean.ExecuteAsyncrename and the exceptionusing.Merge order
🤖 Generated with Claude Code