Commit 559cf95
committed
fix: isolate DlqDatabase:DataDirectory per Simulator test factory instance
SimulatorWebApplicationFactory already isolated NamespaceRepository:
DataDirectory with a per-instance GUID temp dir, but never applied the
same override to DlqDatabase:DataDirectory. Every factory instance
therefore shared one on-disk SQLite file. When xUnit ran test classes
in parallel, concurrent instances raced on ApplySchemaUpgradesAsync's
check-then-act column guard, and the second ALTER TABLE ADD COLUMN
collided with "duplicate column name: CloudProvider" —
SimulatedAzureMessagesTests.PeekMessages_AzureOrdersQueue_ReturnsActiveMessages
and
SimulatedAwsMessagesTests.PeekMessages_AwsCheckoutQueue_ReturnsActiveMessages.
Reusing the same per-instance _testDataDir for DlqDatabase:DataDirectory
gives each factory its own SQLite file, making the race structurally
impossible rather than merely less likely. Verified: both previously
failing tests pass in isolation, and the full suite (1524 unit + 73
integration) passes twice back-to-back under real parallel execution.1 parent 9e1767a commit 559cf95
1 file changed
Lines changed: 1 addition & 0 deletions
File tree
- services/api/tests/ServiceHub.IntegrationTests/Infrastructure
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
| 34 | + | |
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| |||
0 commit comments