-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
refactor: only use channel to return test results #6550
Conversation
07e63a1
to
653c009
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very excited about this!
all those changes lgtm!
crates/forge/src/multi_runner.rs
Outdated
/// The same as [`test`](Self::test), but returns the results instead of streaming them. | ||
/// | ||
/// Note that returns only when all tests have been executed. | ||
pub async fn test_map( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe something like test_collect
? or collect_results
?
filter: impl TestFilter, | ||
stream_result: Option<Sender<(String, SuiteResult)>>, | ||
filter: &dyn TestFilter, | ||
stream_result: mpsc::Sender<(String, SuiteResult)>, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I also want to have here (for followups) is dedicated types instead of tuples.
dealing with BtreeMap<String, Suiteresult>
is a bit horrible, I think we want a wrapper type so we can add useful helper functions
Motivation
Starting to clean up the mess that is test code.
Solution