Absorb the sharded scrub template in TenantPartitionedEventsTests/Sharded - #5103
Merged
Conversation
…rded Follow-up to the PartitionedStoreContext absorption: 14 classes on the "sharded-tenant-partitioned" collection re-declared the identical per-test scrub (drop the master "sharded" schema, then per shard: drop "tenants" and wipe every mt_* object from public) plus per-file store disposal bookkeeping. The new Sharded/ShardedPartitionedContext base owns the scrub and tracked disposal; BuildShardedStore offers the standard three-shard wiring for files that match it, and TrackStore covers the rest. Migration was deliberately conservative: most files' sharding blocks omit UseSmallestDatabaseAssignment or add doc-level partitioning, so their DocumentStore.For wiring is kept verbatim and only wrapped in TrackStore — no store configuration changed. Bug_4944 keeps its extra foreign_app/other_app_ledger cleanup via an InitializeAsync override. Left alone: Bug_4863_4855 (own collection + 2-shard fixture + own schema names), sharded_progress_reading_4797 (different scrub set), and the two IHost-based files (multi_node_hotcold, dynamic_tenant_lifecycle). Net -351 lines. TPE suite net9.0: 238 passed, 0 failed, 2 pre-existing skips; net10.0 compiles. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01U99pVx6kXwiGmaBUGLv7jB
jeremydmiller
added a commit
that referenced
this pull request
Aug 1, 2026
Continues the phase-2 harness standardization (#5098-#5103): the DaemonTests side of the inline Host.CreateDefaultBuilder + AddMarten pattern moves onto the shared HostedStoreContext harness from #5102, retiring nine hard-coded schema literals (bug2073, bug3059, coordinator, missing_events, subscriptions_start, ioc, bluegreen, feature_4284_net*, eao_*) in favor of per-class schema names, and letting the harness own host lifetime. Migrated: - Bugs/Bug_2073_tenancy_problems - Bugs/Bug_3059_double_application - Composites/Feature_4284_composite_projection_with_services - Internals/pausing_and_resuming_the_daemon - Resiliency/skipping_unknown_event_types_in_continuous_builds (also fixes the NRE in DisposeAsync when a test failed before _processor was assigned) - Subscriptions/subscribe_from_present - Subscriptions/subscriptions_end_to_end: the five host-based tests split out of the OneOffConfigurationsContext class into a new subscription_registrations_through_host: HostedStoreContext class; subscriptions_are_part_of_the_event_store_usage keeps a hand-rolled host because it asserts exactly one IEventStore registration and the harness's main store would add a second - EventSourcingTests/event_append_observation (per-test schema suffixes now derive from SchemaName) - DaemonTests.ManualOnly/Coordination/blue_green_projection_deployments Also fixes a latent ManualOnly breakage: BlueProjection/GreenProjection use conventional Apply methods but were not declared partial, so 4 of the 5 blue/green tests failed on master with "No source-generated dispatcher found". Both are partial now and all 5 pass. Deliberately untouched: Internals/service_registrations (Build()-only Lamar container assertions, no started host), Bug_3080 + MultiTenancy/dynamic_spin_up_of_dynamic_tenants + multi_tenancy_by_database (real multi-database provisioning that does not fit the single-connection harness), Examples/* and Projections/testing_projections.cs (doc snippets), Daemon/postgres_listen_notify_wakeup_tests.cs (#4961 in flight), and the four TenantPartitionedEventsTests multi-node host files (follow-up). net9.0: DaemonTests 260/260, EventSourcingTests event_append_observation 8/8, ManualOnly blue_green 5/5. Claude-Session: https://claude.ai/code/session_01U99pVx6kXwiGmaBUGLv7jB Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
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.
Continuation of the test-harness standardization program: the 14 uniform classes on the
sharded-tenant-partitionedcollection re-declared the same per-test scrub (drop mastershardedschema → per shard: droptenants+ wipemt_*from public) and store-disposal bookkeeping. They now inheritSharded/ShardedPartitionedContext. Net −351 lines.Design notes:
BuildShardedStore(configure)provides the standard three-shard wiring + common partitioned-event config (AutoCreatedeliberately left per-file — files split betweenAlland the default). Only 3 files matched it exactly.DocumentStore.Forwiring verbatim (most omitUseSmallestDatabaseAssignment; two add doc-level partitioning; one has a config hook inside the sharding block) and are just wrapped inTrackStore— no store configuration changed, only lifecycle absorbed.Bug_4944keeps its extra non-Martenforeign_app/other_app_ledgercleanup via anInitializeAsyncoverride on top of the base scrub.AppendMode = QuickWithServerTimestampsin the builder is behavior-neutral for files that omitted the line — it's the V9 default (EventGraph.cs:99), which defuses the classification concern about the 4 files without it.Left alone:
Bug_4863_4855(own collection + 2-shard fixture + own schemas),sharded_progress_reading_4797(drops a different schema set, skips the public-schema wipe),multi_node_hotcold_sharded_partitioned_events+dynamic_tenant_lifecycle_on_shard_during_daemon(IHost-based — candidates forHostedStoreContextfollow-up).Verification: TPE suite net9.0 238 passed / 0 failed / 2 pre-existing skips (includes the mid-test store-dispose case in
Bug_4942); net10.0 compiles.🤖 Generated with Claude Code
https://claude.ai/code/session_01U99pVx6kXwiGmaBUGLv7jB