Skip to content

Refactor fail method in matchers #6517

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

Merged
merged 4 commits into from
Mar 27, 2025

Conversation

MrAlias
Copy link
Contributor

@MrAlias MrAlias commented Mar 26, 2025

Accept a format and parameters just like fmt.Sprintf given almost all calls to e.fail follow this format.

Accept a format and parameters just like `fmt.Sprintf` given almost all
calls to `e.fail` follow this format.
@MrAlias MrAlias added the Skip Changelog PRs that do not require a CHANGELOG.md entry label Mar 26, 2025
@MrAlias MrAlias added this to the v1.36.0 milestone Mar 26, 2025
@MrAlias MrAlias marked this pull request as ready for review March 26, 2025 19:48
Copy link
Member

@dmathieu dmathieu left a comment

Choose a reason for hiding this comment

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

How about renaming the method to failf?

@pellared
Copy link
Member

pellared commented Mar 27, 2025

How about renaming the method to failf?

Or even fatalf to indicate that it interrupts the test (e g. t.Fail() does not not interrupt the test)

@MrAlias
Copy link
Contributor Author

MrAlias commented Mar 27, 2025

Updated the name from fail to fatalf.

@MrAlias MrAlias merged commit 1852b39 into open-telemetry:main Mar 27, 2025
29 checks passed
@MrAlias MrAlias deleted the matchers-fail-fmt branch March 27, 2025 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Skip Changelog PRs that do not require a CHANGELOG.md entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants