[Internal] Tests: Adds timeouts and polling loops for low-impact test reliability#5715
Merged
kirankumarkolli merged 2 commits intoMar 20, 2026
Merged
Conversation
… reliability Adds [Timeout] attributes to prevent pipeline budget overruns and replaces fixed Task.Delay waits with bounded polling loops across multiple test files. Changes: - ClientTelemetryTests: [Timeout(300000)] on 12 tests - EndToEndTraceWriterBaselineTests: [Timeout(300000)] on 2 tests - CosmosHttpClientCoreTests: [Timeout(120000)] + delay margin increases - GlobalEndpointManagerTest: Polling loop + [Timeout(30000)] - BatchAsyncStreamerTests: Polling loop for semaphore assertion - PartitionControllerTests: Polling loop for lease release - CosmosAuthorizationTests: Bounded polling with 20s timeout Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
kirankumarkolli
approved these changes
Mar 19, 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.
Summary
Adds
[Timeout]attributes to prevent pipeline budget overruns and replaces fixedTask.Delaywaits with bounded polling loops across multiple test files.Changes
Timeout Attributes
[Timeout(300000)](5 min) on all 12 test methods. Prevents hanging tests from consuming the entire 60-minute job budget.[Timeout(300000)](5 min) onQueryAsyncandTypedPointOperationsAsync.[Timeout(120000)](2 min) on retry tests + increased delay margins past policy thresholds.[Timeout(30000)]onEndpointFailureMockTest.Polling Loops (replacing fixed delays)
Mock.Verifyinstead of fixed 100ms sleep.Tests Improved
Impact