Skip to content

Stabilize flaky TimerOrleansTest_Basic - #9934

Merged
ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:copilot/fix-timerorleans-basic-flaky-20260216161501
Feb 17, 2026
Merged

ReubenBond merged 2 commits into
dotnet:mainfrom
ReubenBond:copilot/fix-timerorleans-basic-flaky-20260216161501

Conversation

@ReubenBond

@ReubenBond ReubenBond commented Feb 17, 2026 •

Copy link
Copy Markdown
Member

Summary

  • stabilize TimerOrleansTest_Basic by increasing its polling timeout from 50 to 100 timer periods
  • keep timer assertions and test intent unchanged

Testing

  • dotnet test .\test\DefaultCluster.Tests\DefaultCluster.Tests.csproj --framework net8.0 --filter "FullyQualifiedName=DefaultCluster.Tests.TimerTests.TimerOrleansTest.TimerOrleansTest_Basic"
  • dotnet test .\test\DefaultCluster.Tests\DefaultCluster.Tests.csproj --framework net10.0 --filter "FullyQualifiedName=DefaultCluster.Tests.TimerTests.TimerOrleansTest.TimerOrleansTest_Basic"
  • repeated no-build reruns for both frameworks
Microsoft Reviewers: Open in CodeFlow

Increase the polling timeout in TimerOrleansTest_Basic from 50 to 100 periods to tolerate scheduling variance and avoid false failures when the counter is still 8.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings February 17, 2026 00:47

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to reduce flakiness in TimerOrleansTest_Basic (a SlowBVT timer test) by allowing more time for the polling loop to observe the expected number of timer ticks, without changing the assertions or core intent of the test.

Changes:

  • Increased the polling timeout in TimerOrleansTest_Basic from 50 to 100 timer periods.

Replace stopwatch polling loops in TimerOrleansTest_Basic and TimerOrleansTest_Basic_Poco with TestingUtils.WaitUntilAsync-based waits. This restores the original timeout and avoids stale counter reads and unnecessary polling pressure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@ReubenBond
ReubenBond enabled auto-merge February 17, 2026 01:12
@ReubenBond
ReubenBond added this pull request to the merge queue Feb 17, 2026
Merged via the queue into dotnet:main with commit 1e8c33c Feb 17, 2026
59 checks passed
@ReubenBond
ReubenBond deleted the copilot/fix-timerorleans-basic-flaky-20260216161501 branch February 17, 2026 02:18
rkargMsft pushed a commit to rkargMsft/orleans that referenced this pull request Feb 27, 2026
* Stabilize TimerOrleansTest_Basic

Increase the polling timeout in TimerOrleansTest_Basic from 50 to 100 periods to tolerate scheduling variance and avoid false failures when the counter is still 8.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

* Use condition waits in timer basic tests

Replace stopwatch polling loops in TimerOrleansTest_Basic and TimerOrleansTest_Basic_Poco with TestingUtils.WaitUntilAsync-based waits. This restores the original timeout and avoids stale counter reads and unnecessary polling pressure.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 19, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants