Skip to content
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

0015: Refactor Tests to Not Return Result<_> for Clearer Errors #45

Merged
merged 1 commit into from
Nov 23, 2021

Conversation

karlmdavis
Copy link
Owner

It's kinda' sorta' explained here: rust-lang/rust#69517. Basically, though, tests that return a Result<_> will have less helpful backtraces than tests that just use asserts and unwrap()/expect(_) all over the place.

I recently ran into an undiagnosable test failure that this commit makes diagnosable, so this is now "the way things are done" for this project, going forwards.

(see title)

This is part of the work on User Story 15: Switch to Tracing for Logs.

@karlmdavis karlmdavis added the enhancement New feature or request label Nov 23, 2021
@karlmdavis karlmdavis self-assigned this Nov 23, 2021
@karlmdavis karlmdavis enabled auto-merge (rebase) November 23, 2021 14:50
It's kinda' sorta' explained here:
<rust-lang/rust#69517>. Basically, though,
tests that return a `Result<_>` will have less helpful backtraces than
tests that just use asserts and `unwrap()/expect(_)` all over the place.

I recently ran into an undiagnosable test failure that this commit makes
diagnosable, so this is now "the way things are done" for this project,
going forwards.
@karlmdavis karlmdavis force-pushed the 0015-tests-return-void branch from d8619e3 to 4f84938 Compare November 23, 2021 14:52
@karlmdavis karlmdavis merged commit 40ffdfd into main Nov 23, 2021
@karlmdavis karlmdavis deleted the 0015-tests-return-void branch November 23, 2021 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant