Skip to content

Reduce flakiness in long-running stateless HTTP tool timeout test#1300

Merged
jeffhandley merged 3 commits intomainfrom
copilot/improve-test-reliability
Feb 19, 2026
Merged

Reduce flakiness in long-running stateless HTTP tool timeout test#1300
jeffhandley merged 3 commits intomainfrom
copilot/improve-test-reliability

Conversation

Copy link
Contributor

Copilot AI commented Feb 17, 2026

  • Review new PR comments and confirm actionable feedback
  • Inspect current implementation and recent commits for the affected test
  • Update retry logic to use OperationCanceledException as requested
  • Run targeted test for LongRunningToolCall_DoesNotTimeout_WhenNoEventStreamStore
  • Run build and full test suite to validate no regressions
  • Run automated code review and security scan
  • Reply on addressed comment threads with the commit hash

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

Co-authored-by: halter73 <54385+halter73@users.noreply.github.com>
@halter73 halter73 marked this pull request as ready for review February 17, 2026 21:22
Copy link
Contributor

@halter73 halter73 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is intended to reduce test failures like the following:

  Failed ModelContextProtocol.AspNetCore.Tests.MapMcpStatelessTests.LongRunningToolCall_DoesNotTimeout_WhenNoEventStreamStore [1 s]
  Error Message:
   System.Threading.Tasks.TaskCanceledException : The request was canceled due to the configured HttpClient.Timeout of 1 seconds elapsing.

https://github.com/modelcontextprotocol/csharp-sdk/actions/runs/22092487205/job/63841819265?pr=1295

We could consider using a timeout of larger than 1 second to reduce the flakiness, but then we'd have to make the LongRunningToolCall longer too. I think this retry logic should reduce the flakiness enough while still keeping the test shortish, but I'm open to ideas for alternative ways to test this that are faster or more reliable.

Copilot AI changed the title [WIP] Update LongRunningToolCall test for reliability and performance Reduce flakiness in long-running stateless HTTP tool timeout test Feb 17, 2026
Copilot AI requested a review from halter73 February 17, 2026 21:28
stephentoub
stephentoub previously approved these changes Feb 17, 2026
Co-authored-by: halter73 <54385+halter73@users.noreply.github.com>
@jeffhandley jeffhandley merged commit 231e013 into main Feb 19, 2026
10 checks passed
@jeffhandley jeffhandley deleted the copilot/improve-test-reliability branch February 19, 2026 05:56
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.

4 participants