Skip to content

fix: increase deadliner test timing#324

Merged
varex83 merged 1 commit into
NethermindEth:mainfrom
pinebit:fix/flaky-deadliner-test
Apr 15, 2026
Merged

fix: increase deadliner test timing#324
varex83 merged 1 commit into
NethermindEth:mainfrom
pinebit:fix/flaky-deadliner-test

Conversation

@pinebit
Copy link
Copy Markdown
Collaborator

@pinebit pinebit commented Apr 14, 2026

Summary

  • The test_deadliner test used 10ms-per-slot deadline margins, creating a race condition: wall-clock time elapsed between capturing start_time and the background task processing add() could exceed the deadline on loaded CI runners, making "non-expired" duties appear expired.
  • Increased deadline margins to 500ms per slot — enough headroom for scheduling jitter while keeping the test fast (~1-2s).
  • Raised the output collection timeout from 1s to 5s to match the longer deadlines.

Test plan

  • cargo test --package pluto-core deadline::tests::test_deadliner passes
  • cargo +nightly fmt --all --check clean
  • cargo clippy --package pluto-core --all-targets --all-features -- -D warnings clean

🤖 Generated with Claude Code

The test_deadliner test used 10ms-per-slot deadline margins, which
could be exceeded by wall-clock time elapsed between capturing
start_time and the background task processing add() on loaded CI
runners, causing non-expired duties to appear expired.

Increase to 500ms per slot and raise the collection timeout to 5s.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@pinebit pinebit changed the title fix: increase deadliner test timing margins to prevent CI flakiness fix: increase deadliner test timing Apr 14, 2026
@emlautarom1 emlautarom1 requested a review from varex83 April 14, 2026 20:27
@emlautarom1
Copy link
Copy Markdown
Collaborator

@varex83 Could be a reasonable workaround until we figure out #306, wdyt?

Copy link
Copy Markdown
Collaborator

@varex83 varex83 left a comment

Choose a reason for hiding this comment

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

Yes, I think we can use this approach as a workaround

@varex83 varex83 merged commit 0830693 into NethermindEth:main Apr 15, 2026
8 checks passed
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.

3 participants