Migrate raw-DocumentStore.For event sourcing tests onto standard harnesses - #5099
Merged
Conversation
…esses Phase 2 of the test-harness standardization program: retire hand-rolled store/schema lifecycle where a standard context already covers it. - Bug_4625, Bug_4619 -> BugIntegrationContext: per-test ad-hoc schema naming, manual DropSchemaAsync, and raw DocumentStore.For replaced by StoreOptions(); raw SQL now targets SchemaName. - Bug_4261_multistream_sample_coverage -> OneOffConfigurationsContext: seven hand-numbered TFM-suffixed schemas collapse to the per-class schema; StoreOptions() replaces DocumentStore.For + CompletelyRemoveAllAsync. - rebuild_concurrency_cap_resolution -> OneOffConfigurationsContext with SeparateStore(): drops the shared "rebuild_cap" schema literal; the custom-pool-size tests override the connection string inside the configure lambda. Deliberately left alone: testing_projections.cs and Examples/* (bodies are published doc snippets where raw DocumentStore.For is the point), Bug_4557 (store construction throwing is the behavior under test), Bug_5044 (needs two simultaneous schemas by design), and the config-only option-assertion files that never touch the database. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U99pVx6kXwiGmaBUGLv7jB
19 tasks
This was referenced Aug 4, 2026
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.
Phase 2 (partial) of the test-harness standardization program (
HANDOFF-test-harness-standardization.md): the EventSourcingTests files that build rawDocumentStore.Forstores per[Fact]move onto the standard contexts, retiring their hand-rolled schema naming + drop + dispose boilerplate.Bugs/Bug_4625_bulk_insert_events_derives_aggregate_type_name.csBugIntegrationContextbugsschema viaStoreOptions()Bugs/Bug_4619_archive_stream_explicit_column_list_after_column_add.csBugIntegrationContextProjections/.../Bug_4261_multistream_sample_coverage.csOneOffConfigurationsContextrebuild_concurrency_cap_resolution.csOneOffConfigurationsContext+SeparateStore()rebuild_capschema literalDeliberately not migrated (with reasons, so the next sweep doesn't re-litigate):
Projections/testing_projections.cs,Examples/*— test bodies are published doc snippets (#region sample_*); rawDocumentStore.For/AddMartenwith visible connection strings is the documented content.Bugs/Bug_4557_...— assertsDocumentStore.Forthrows at construction; the raw call is the act under test.Bugs/Bug_5044_natural_key_foreign_key_guard.cs— requires two simultaneous schemas in one database (that's the bug); no standard context models that.cannot_register_duplicate_projections_by_name,ignoring_indexes_on_event_store_tables,blue_green_deployment_of_aggregates,aggregation_projection_validation_rules,when_registering_a_custom_projection_type) — pure option assertions, no DB; effectively unit tests.Verification: all 15 tests across the four migrated files pass on net9.0; full ES suite run before merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01U99pVx6kXwiGmaBUGLv7jB