refactor(csharp): rewrite integration tests to remove DependsOn #2710
+980
−1,394
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.
Remove all DependsOn attributes from 11 test files. Each test now creates its own resources with unique names via Guid.NewGuid(), ensuring full isolation and eliminating ordering dependencies.
Delete 16 unused fixture, helper, and model files that were only needed by the old DependsOn-based test structure.
Which issue does this PR close?
Closes #2654
Rationale
The DependsOn attribute creates ordering dependencies between tests, which leads to flaky failures and makes it hard to run tests in isolation. Independent tests are more reliable and easier to debug.
What changed?
Tests relied on DependsOn to run in a fixed sequence, sharing resources created by earlier tests. If one test failed, all downstream tests would skip or fail regardless of their own correctness.
Each test now creates its own stream, topic, and other resources with unique Guid-based names, then cleans up or simply leaves them isolated. The 16 fixture, helper, and model files that only existed to support the old shared-state pattern were removed as dead code.
Local Execution
AI Usage