You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you use TestAbortedException to conditionally skip a test (either manually, or for example using @PendingFeature or @PendingFeatureIf) and have @Retry effective on that feature (either directly, or from specification, or via some global retry extension) the test is never skipped unless you add the condition { failure !instanceof TestAbortedException } to the retry annotation.
Without that condition and otherwise default setup (depending on extension order, or always when also using mode = SETUP_FEATURE_CLEANUP), the feature throws TestAbortedException, the retry interceptor sees exception and retries, and after retries are through, it throws a MultipleFailuresError with the TestAbortedExceptions inside.
This then causes the iteration to not be skipped, but failed.
Maybe it would be better to either never (maybe configurable) retry for TestAbortedException, or alternatively when it is time to throw the MultipleFailuresError, check (maybe configurable) whether all throwables are TestAbortedExceptions and in that case add all others to the first as suppressed ones and throw the first TestAbortedException so that the result is a skip, not failure.
Dependencies
Spock 2.3-groovy-3.0
The text was updated successfully, but these errors were encountered:
Describe the bug
If you use
TestAbortedException
to conditionally skip a test (either manually, or for example using@PendingFeature
or@PendingFeatureIf
) and have@Retry
effective on that feature (either directly, or from specification, or via some global retry extension) the test is never skipped unless you add the condition{ failure !instanceof TestAbortedException }
to the retry annotation.Without that condition and otherwise default setup (depending on extension order, or always when also using
mode = SETUP_FEATURE_CLEANUP
), the feature throwsTestAbortedException
, the retry interceptor sees exception and retries, and after retries are through, it throws aMultipleFailuresError
with theTestAbortedException
s inside.This then causes the iteration to not be skipped, but failed.
Maybe it would be better to either never (maybe configurable) retry for
TestAbortedException
, or alternatively when it is time to throw theMultipleFailuresError
, check (maybe configurable) whether all throwables areTestAbortedException
s and in that case add all others to the first as suppressed ones and throw the firstTestAbortedException
so that the result is a skip, not failure.Dependencies
Spock 2.3-groovy-3.0
The text was updated successfully, but these errors were encountered: