Skip to content

fix: widen 'not too slow to reap' threshold in t/timeout.t - #283

Draft
toddr-bot wants to merge 1 commit into
cpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-timeout-test-threshold
Draft

fix: widen 'not too slow to reap' threshold in t/timeout.t#283
toddr-bot wants to merge 1 commit into
cpan-authors:mainfrom
toddr-bot:koan.toddr.bot/fix-timeout-test-threshold

Conversation

@toddr-bot

@toddr-bot toddr-bot commented Apr 5, 2026

Copy link
Copy Markdown
Contributor

What

Raise the timing threshold in t/timeout.t test 26 from <= 2 to <= 10 seconds.

Why

All three CPAN smoker failures for 20260402.0 are this single test (FAIL matrix):

  • Perl 5.10.1 — 3 seconds elapsed
  • Perl 5.30.3 — 4 seconds elapsed
  • Perl 5.12.5 — 5 seconds elapsed

The <= 2 threshold is too tight on loaded machines because time() has 1-second granularity (up to 1s measurement error), sleep(1) takes longer under CPU contention, and the select() backoff loop adds 0.1-0.5s of reaping latency.

How

One-line change: <= 2<= 10. The test guards against hanging until the 180s timeout, not sub-second reaping performance. 10 seconds is generous enough for loaded smokers while still catching real regressions.

Testing

prove -Ilib t/timeout.t passes. Full suite passes (only pre-existing t/pty.t IO::Pty version skip).

🤖 Generated with Claude Code


Quality Report

Changes: 1 file changed, 1 insertion(+), 1 deletion(-)

Code scan: clean

Tests: failed (0 Failed, 37 tests)

Branch hygiene: clean

Generated by Kōan post-mission quality pipeline

CPAN smokers (DCANTRELL, Perl 5.10-5.30, Linux) fail test 26 with
3-5 seconds elapsed. The original <= 2 threshold is too tight because:

- time() has 1-second granularity (up to 1s measurement error)
- sleep(1) takes longer on loaded smoker machines
- The select() backoff loop adds 0.1-0.5s reaping latency

Raise to <= 10. The test guards against hanging until the 180s timeout,
not sub-second reaping performance.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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