Skip to content

Structure

InfrastructureRetryScheduler

Manages infrastructure-level retry logic for test invocations across all platforms.

struct InfrastructureRetryScheduler

Overview

InfrastructureRetryScheduler wraps any async test operation and retries it when the platform-specific InfrastructureFailureClassifier determines that a failure is transient. It uses exponential backoff with jitter to avoid thundering-herd problems.

Design

 ┌─────────────────────────────────────────┐
 │       InfrastructureRetryScheduler       │
 │  ┌───────────┐    ┌──────────────────┐  │
 │  │ RetryOpts │    │    Classifier    │  │
 │  │ (config)  │    │ (platform impl) │  │
 │  └───────────┘    └──────────────────┘  │
 └─────────────────────────────────────────┘
        │                    │
    exponential          isRetryable(log:)
    backoff + jitter

Usage

let scheduler = InfrastructureRetryScheduler(
    options: retryOptions,
    classifier: IOSInfrastructureClassifier()
)
let result = try await scheduler.execute(label: "iPhone 16 Pro") {
    try await runXcodeBuild(...)
}

Topics

Structures

Initializers

Relationships

Conforms To

  • Swift.Sendable
  • Swift.SendableMetatype