Skip to content

Fix the @Retry documentation #2174

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Fix the @Retry documentation #2174

wants to merge 2 commits into from

Conversation

Vampire
Copy link
Member

@Vampire Vampire commented Jun 5, 2025

No description provided.

@Vampire Vampire force-pushed the vampire/fix-retry-docs branch from 0fbb1a3 to ad388ae Compare June 5, 2025 09:38
Copy link
Member Author

Vampire commented Jun 5, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.90%. Comparing base (1183baa) to head (a8dd99c).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff            @@
##             master    #2174   +/-   ##
=========================================
  Coverage     81.90%   81.90%           
  Complexity     4732     4732           
=========================================
  Files           463      463           
  Lines         14767    14767           
  Branches       1869     1869           
=========================================
  Hits          12095    12095           
  Misses         1981     1981           
  Partials        691      691           
Files with missing lines Coverage Δ
spock-core/src/main/java/spock/lang/Retry.java 100.00% <ø> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Vampire Vampire force-pushed the vampire/fix-retry-docs branch from ad388ae to 592f7a9 Compare June 5, 2025 11:23
@Vampire Vampire force-pushed the vampire/fix-retry-docs branch from 592f7a9 to a8dd99c Compare June 5, 2025 14:46
@@ -351,63 +351,27 @@ With the flag `applyGlobalTimeoutToFixtures` you can control if the global timeo
The `@Retry` extensions can be used for flaky integration tests, where remote systems can fail sometimes.
By default it retries an iteration `3` times with `0` delay if either an `Exception` or `AssertionError` has been thrown, all this is configurable.
In addition, an optional `condition` closure can be used to determine if a feature should be retried.
It also provides special support for data driven features, offering to either retry all iterations or just the failing ones.
In its standard mode it only retries the feature method execution, but this can be changed using `mode` to
also run setup and cleanup on retries. Even in this mode, the retry is only triggered if the feature method is failing
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@leonard84 is this actually the intended and expected behavior?
That only expected failures in the feature method trigger a retry I mean.
I do some UI tests using Geb with Marathon driver and it happens sometimes on GHA that the application cannot be started and thus the driver throws an exception.

This is done in an iteration interceptor before calling proceed, the iteration interceptor is within the retry iteration interceptor due to using global retry extension. But as the error happens there and not during feature method invocation, it does not cause a retry.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant