Skip to content

Add adaptive test timeout utilities#74

Merged
leynos merged 17 commits intomainfrom
codex/add-adaptive-timeout-system
Aug 22, 2025
Merged

Add adaptive test timeout utilities#74
leynos merged 17 commits intomainfrom
codex/add-adaptive-timeout-system

Conversation

@leynos
Copy link
Copy Markdown
Owner

@leynos leynos commented Aug 19, 2025

Summary

  • add smart timeout calculators with progressive retries
  • switch daemon tests to adaptive timeouts
  • document adaptive test timeout helper

Testing

  • make fmt
  • make lint
  • make markdownlint
  • make test

closes #71


https://chatgpt.com/codex/tasks/task_e_68a4a71d79008322b249d6cf364c9ae1

Summary by Sourcery

Introduce adaptive timeouts with progressive retry support to daemon tests by adding a smart_timeouts module and timeout_with_retries helper, refactor existing tests to use these adaptive settings, remove legacy coverage-based multipliers, and document the new utilities.

New Features:

  • Add smart_timeouts module with TimeoutConfig and TestComplexity to compute adaptive durations
  • Implement timeout_with_retries helper to run operations with progressive timeout attempts

Enhancements:

  • Refactor daemon tests to replace fixed timeouts and coverage detection logic with adaptive timeouts and retries
  • Define constants for common test scenarios (DRAINED_NOTIFICATION, WORKER_SUCCESS, WORKER_ERROR)

Documentation:

  • Add docs/adaptive-timeouts.md to explain usage of adaptive timeout utilities

Tests:

  • Update existing async tests to use timeout_with_retries and smart_timeouts constants instead of manual tokio::timeout calls and coverage multipliers

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement intelligent adaptive timeout system for robust test execution

1 participant