Skip to content

Ensure OutboxJoin schema provisioning in fanout integration tests - #100

Draft
SamuelMcAravey with Copilot wants to merge 3 commits into
mainfrom
copilot/sub-pr-98
Draft

Ensure OutboxJoin schema provisioning in fanout integration tests#100
SamuelMcAravey with Copilot wants to merge 3 commits into
mainfrom
copilot/sub-pr-98

Conversation

Copilot AI commented Dec 19, 2025

Copy link
Copy Markdown
Contributor

The FanoutCoordinatorIntegrationTests.InitializeAsync method was provisioning the fanout schema but not creating the OutboxJoin/OutboxJoinMember tables before instantiating SqlOutboxJoinStore. This caused FanoutSlices_CanJoinDownstreamMessagesIdempotently to fail with "Invalid object name 'dbo.OutboxJoin'" when attempting database operations.

Changes:

  • Added DatabaseSchemaManager.EnsureOutboxJoinSchemaAsync call in InitializeAsync before constructing SqlOutboxJoinStore
  • Fixed InMemoryLease concurrency issues with proper atomic operations and expiration handling
await DatabaseSchemaManager.EnsureFanoutSchemaAsync(
    ConnectionString,
    fanoutOptions.SchemaName,
    fanoutOptions.PolicyTableName,
    fanoutOptions.CursorTableName).ConfigureAwait(false);

await DatabaseSchemaManager.EnsureOutboxJoinSchemaAsync(
    ConnectionString,
    outboxOptions.SchemaName).ConfigureAwait(false);

joinStore = new SqlOutboxJoinStore(
    Options.Create(outboxOptions),
    NullLogger<SqlOutboxJoinStore>.Instance);

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

SamuelMcAravey and others added 3 commits December 18, 2025 22:10
…sues in fanout tests (#99)

Co-authored-by: SamuelMcAravey <11021165+SamuelMcAravey@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Copilot AI changed the title [WIP] Address feedback on ensuring OutboxJoin schema in integration tests Ensure OutboxJoin schema provisioning in fanout integration tests Dec 19, 2025
Copilot AI requested a review from SamuelMcAravey December 19, 2025 06:30
Base automatically changed from codex/2025-12-19-add-integration-tests-for-fanoutcoordinator to main December 19, 2025 06:32
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.

2 participants