spockframework / spockframework/spock
Message and stacktrace of `MultipleFailuresError` like from `RetryExtension` get lost
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 3.6k
- Forks
- 483
- PR merge metrics
- No merged PRs in 30d
Description
Describe the bug
If you have a @Retryed feature and it fails, the RetryExtension throws a MultipleFailuresError with message Retries exhausted.
Later on Spock unwraps this MultipleFailuresError and stores the individual errors in the error info collector.
And further later Spock wraps these multiple failures again in a fresh MultipleFailuresError thrown from ErrorInfoCollector#assertEmpty.
At this point the statcktrace where the original MultipleFailuresError is coming from is lost, as well as the original message, leaving no trace on what actually happened.
To Reproduce
Have a failing retried feature, look at the reported failure message and stacktrace, which also is not filtered. (Which is good in this case or nthing would be left to look at.)
Expected behavior
Original message and stacktrace preserved.
Actual behavior
Information is lost.
Java version
11
What operating system are you using
Other
Dependencies
Spock 2.3-groovy-4.0
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with RetryExtension and ErrorInfoCollector#assertEmpty, then trace how MultipleFailuresError is unwrapped and recreated for a failing @Retry feature. Reproduce the reported failure with Spock 2.3-groovy-4.0 and verify that the original message and stacktrace remain available in the final failure.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- groovy, java
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100