Skip to content

Migrate raw-DocumentStore.For event sourcing tests onto standard harnesses - #5099

Merged
jeremydmiller merged 1 commit into
masterfrom
test/es-raw-store-cleanup
Aug 1, 2026
Merged

Migrate raw-DocumentStore.For event sourcing tests onto standard harnesses#5099
jeremydmiller merged 1 commit into
masterfrom
test/es-raw-store-cleanup

Conversation

@jeremydmiller

Copy link
Copy Markdown
Member

Phase 2 (partial) of the test-harness standardization program (HANDOFF-test-harness-standardization.md): the EventSourcingTests files that build raw DocumentStore.For stores per [Fact] move onto the standard contexts, retiring their hand-rolled schema naming + drop + dispose boilerplate.

File Now Notes
Bugs/Bug_4625_bulk_insert_events_derives_aggregate_type_name.cs BugIntegrationContext 2 ad-hoc pid+guid schemas → bugs schema via StoreOptions()
Bugs/Bug_4619_archive_stream_explicit_column_list_after_column_add.cs BugIntegrationContext same
Projections/.../Bug_4261_multistream_sample_coverage.cs OneOffConfigurationsContext 7 hand-numbered TFM-suffixed schemas → one per-class schema
rebuild_concurrency_cap_resolution.cs OneOffConfigurationsContext + SeparateStore() retires the shared rebuild_cap schema literal

Deliberately 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_*); raw DocumentStore.For/AddMarten with visible connection strings is the documented content.
  • Bugs/Bug_4557_... — asserts DocumentStore.For throws 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.
  • Config-only files (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

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant