RetryExecutionCoordinator class final

Executes attempts and applies the aggregate retry metadata to the final result. The callback owns setup, cleanup, and attempt execution; this class only owns retry policy and result assembly.

Constructors

RetryExecutionCoordinator({required int retries})
const

Properties

hashCode → int
The hash code for this object.
no setterinherited
retries → int
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
run({required Future<EnsembleTestRunOutput> executeAttempt(AttemptDescriptor attempt)}) → Future<EnsembleTestRunOutput>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Methods

applySequence(EnsembleSingleTestResult result, AttemptSequence<Object?> sequence) → EnsembleSingleTestResult
Applies the sequence's aggregate fields identically to every adapter. The last result remains the source of all case-specific report details.
attemptCleanupFailureDetails(Iterable<({Object error, StackTrace stackTrace})> failures, {Object? excludeError, String phase = 'attemptCleanup'}) → List<TestFailureDetails>
Converts teardown failures into report details for either adapter.
collect<T>({required int retries, required Future<T> executeAttempt(AttemptDescriptor attempt), required bool succeeded(T outcome), required int durationMs(T outcome), required List<String> logs(T outcome)}) → Future<AttemptSequence<T>>
Shared attempt loop for adapters whose final value is not a complete EnsembleTestRunOutput, such as application-host executions.
runResult({required int retries, required Future<EnsembleSingleTestResult> executeAttempt(AttemptDescriptor attempt)}) → Future<EnsembleSingleTestResult>
Runs a result-producing attempt loop and applies shared aggregate metadata, keeping hosted and standalone retry behavior identical.
withAttemptCleanupFailure(EnsembleSingleTestResult result, {required Object error, required StackTrace stackTrace, String phase = 'attemptCleanup'}) → EnsembleSingleTestResult
Adds a failure from attempt teardown without replacing a failure already reported by the test body. Standalone execution returns failed test results as values, while hosted execution throws them through the attempt boundary; this keeps teardown reporting consistent across both paths.
withAttemptCleanupFailures(EnsembleSingleTestResult result, {required Iterable<({Object error, StackTrace stackTrace})> failures, String phase = 'attemptCleanup', Object? excludeError}) → EnsembleSingleTestResult
Projects all attempt teardown failures through the same precedence rule. The first teardown failure becomes primary only after a passing body; every teardown failure remains secondary when the body already failed.
withRetryMetadata(EnsembleSingleTestResult result, {required int attempts, required int retry, required int durationMs, List<String>? logs}) → EnsembleSingleTestResult
Rebuilds a result with attempt-level aggregate fields while preserving all execution and reporting details from the final attempt.