Skip to content

chore(rust): widen sleep gap in flaky Async.Sleep test#4573

Merged
dbrattli merged 1 commit into
mainfrom
fix/flaky-async-sleep-rust
Apr 26, 2026
Merged

chore(rust): widen sleep gap in flaky Async.Sleep test#4573
dbrattli merged 1 commit into
mainfrom
fix/flaky-async-sleep-rust

Conversation

@dbrattli

Copy link
Copy Markdown
Collaborator

Summary

  • The Async.Sleep works test in tests/Rust/tests/src/AsyncTests.fs is timing-flaky on CI. It relies on Async.Sleep(100) finishing before Async.Sleep(300), but on a loaded runner the second task can be queued >200ms after the first, inverting the order (e.g. build-rust no_std on PR #4571 saw 300100 instead of 100300).
  • Widen the gap from 100ms vs 300ms to 100ms vs 1000ms so scheduling jitter on CI doesn't flip the order.

Test plan

  • CI passes for the build-rust jobs (default, threaded, no_std).
  • The test still meaningfully exercises Async.Sleep ordering across two concurrent tasks.

🤖 Generated with Claude Code

The test relied on Async.Sleep(100) finishing before Async.Sleep(300),
but the 200ms gap is not robust on loaded CI runners — the second task
can be queued >200ms after the first, inverting the order. Widen the
gap to 100ms vs 1000ms.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@dbrattli
dbrattli merged commit ccb62a8 into main Apr 26, 2026
31 checks passed
@dbrattli
dbrattli deleted the fix/flaky-async-sleep-rust branch April 26, 2026 15:31
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.

1 participant