Repository navigation
Preserve messages and stack traces of external multiple failures - #2438
liyifan9642-creator wants to merge 1 commit into
Conversation
Retain aggregate messages, stack traces, causes, and suppressed errors while transforming child assertions and notifying listeners. Keep internal condition groups flattened and add regression coverage for both retry modes. Fixes spockframework#2175 Developed with AI assistance.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Merge Risk: ⚪ Minimal · up to The change preserves messages and stack traces of external multiple-failure errors, with tests covering the main paths. No actionable merge-blocking risk was found; the full multi-module build was not run by the author, which is normal CI-level verification. Pre-merge checks |
|
|
Fixes #2175.
MasterRunSupervisorcurrently unwraps everyMultipleFailuresError. The collector then creates a fresh aggregate with an empty heading, losing the original aggregate's message and originating stack trace. This affects exhausted@Retryfailures, among other externally created aggregates.This change keeps external aggregate diagnostics while retaining the existing processing of their children:
SpockMultipleFailuresErrorcontaining the transformed children. The original message is not reused as a heading, since it already includes the child failure text.Externally thrown single-failure aggregates also remain aggregates, including those containing a
TestAbortedException. Plain aborted/skipped exceptions and their listener handling are unchanged. Tests cover this boundary as well as existing retry/abortion interoperability.Verification
Before the production change, the two retry-mode cases and three supervisor regression cases failed on current master; the existing selected tests passed. After the fix, all local runs below completed with zero failures and errors:
The selected core specs cover
MasterRunSupervisorSpec,RetryFeatureExtensionSpec,RetryTestAbortedExceptionInteropSpec,VerifyAll*,VerifyEach*,RunListenerSpec, andAutoCleanupExtension. Added tests also check nested aggregates, cause/suppressed preservation, listener context, repeated collection, and comparison values.Tests ran on Windows using the Gradle wrapper; core Java compilation retains the configured release 8 target.
git diff --checkpasses. The complete multi-moduleallVariants buildand Linux/macOS runs were not performed locally.AI assistance
This change was developed with significant AI assistance, including implementation and regression tests.