Skip to content

Commit 0d28257

Browse files
[Internal] Tests: Adds DoNotParallelize to DistributedTransaction E2E tests (#5711)
## Summary Adds `[DoNotParallelize]` attribute to `DistributedTransactionE2ETests` to prevent concurrent test execution contention on the emulator. ## Root Cause All 4 tests share a `TestInitialize` that creates a new container via `BaseCosmosClientHelper.TestInit()` (which calls `DeleteAllDatabasesAsync`). Concurrent test execution caused resource contention on the emulator, resulting in consistent ~4% failure rate across all 4 tests. ## Tests Fixed (95.82% pass rate each — 16 failures each in 30 days) - `ValidateConflictResponseReturnsErrorStatus` - `ValidateHappyPathRequestAndResponse` - `ValidateMixedOperationsRequestStructure` - `ValidateResponseDeserializesCorrectly` ## Impact - **64 total flaky failures eliminated** (4 × 16) - Split from #5643 for independent validation Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent f406a68 commit 0d28257

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/DistributedTransaction/DistributedTransactionE2ETests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ namespace Microsoft.Azure.Cosmos.SDK.EmulatorTests
1818
using PartitionKey = Cosmos.PartitionKey;
1919

2020
[TestClass]
21+
[DoNotParallelize]
2122
public class DistributedTransactionE2ETests : BaseCosmosClientHelper
2223
{
2324
private const string IdempotencyTokenHeader = HttpConstants.HttpHeaders.IdempotencyToken;

0 commit comments

Comments
 (0)