Files
Andrew Vaillancourt 52d0662c44 Add fail-fast support to validate_equals_with_retry
Introduce ValidationFailureError and add an optional 'failure_values'
parameter to validate_equals_with_retry.

This enables early termination when a known failure value is observed
(e.g., "failed", "aborted"), instead of continuing to poll until timeout.

The feature is particularly useful for tests that wait on long-running
operations where certain states unambiguously indicate failure,
allowing the test to fail quickly and save execution time.

The implementation includes defensive input validation to reject common
misuse (e.g., passing a raw string instead of a sequence).

The change is fully backward compatible: existing calls without the
failure_values parameter behave exactly as before.

Complex failure conditions can still be expressed by raising an exception inside the provided callable.

Change-Id: Ia66f9231ca4cb66c86b715d629fa7354cf6ad293
Signed-off-by: Andrew Vaillancourt <andrew.vaillancourt@windriver.com>
2025-12-18 20:17:45 +00:00
..
2025-05-12 09:04:24 -04:00