FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Include failure causes in `AssertJMultipleFailuresError` message by jjh75607 · Pull Request #4375 · assertj/assertj · GitHub

Include failure causes in AssertJMultipleFailuresError message - #4375

Open
jjh75607 wants to merge 1 commit into
assertj:3.xfrom
jjh75607:fix/soft-assertions-fail-cause-3.x
Open

Include failure causes in AssertJMultipleFailuresError message#4375
jjh75607 wants to merge 1 commit into
assertj:3.xfrom
jjh75607:fix/soft-assertions-fail-cause-3.x

Conversation

Copy link
Copy Markdown

Fixes #4125

Make AssertJMultipleFailuresError#getMessage render the cause of each failure that has one, so SoftAssertions#fail(String, Throwable) shows cause message: ... and the first stack trace elements of the cause again, as in 3.23.1. Failures without a cause are formatted exactly as before.

The cause was lost because getMessage only used the failure message; Throwables.describeErrors (the #864 fix) was reached only through the SoftAssertionError fallback, which never runs when opentest4j is on the classpath.

SoftAssertionsErrorDescriptionTest did not catch this since it asserted the opentest4j prefix but not the cause; it now asserts the cause too. main is not affected: 452cee7 already renders the cause in MultipleAssertionsError.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL