-
Notifications
You must be signed in to change notification settings - Fork 585
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
test: split input/output for planner test #9902
Conversation
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.
This is for reviewer to play with only
Codecov Report
@@ Coverage Diff @@
## main #9902 +/- ##
==========================================
+ Coverage 71.09% 71.14% +0.05%
==========================================
Files 1250 1249 -1
Lines 209455 209310 -145
==========================================
+ Hits 148904 148913 +9
+ Misses 60551 60397 -154
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 8 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
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.
Generally LGTM. Maybe we need to tell developers that apply-planner-test
no longer works and we only need do-apply-planner-test
.
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.
LGTM! So thanks.
just to confirm, what will happen when some cases panicked? And how a developer can not which case panic in the new framework? In other words, we might need some logic to replace this code. risingwave/src/frontend/planner_test/src/bin/apply.rs Lines 26 to 39 in 68140f3
|
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.
LGTM
We don't need to handle that now. We used to do it because |
0294772
to
e76d853
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.
LGTM
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
So that we can edit input files painlessly (e.g., no merge conflicts). The output files still contain the inputs for readability, and have exactly the same format as before.
(For reviewer: to confirm output is unchanged, run
git diff --stat
locally. GitHub is too slow 🤪)If there are no such changes, it should be good
close #8557
The trick is similar to #9787, i.e., make planner tests snapshot testing.
Note: The new result check is simply assert eq the whole file, and produce the diff, instead check test cases one by one.
Limitations
expect-test
isn't optimal (see Panic message is too verbose for large result rust-analyzer/expect-test#39). But since the workflow is mostly just rundapt
, and then use external diff tool to review it, it might be acceptable. Alternatively we can fork and improveexpecte-test
, or useinsta
instead.Checklist For Contributors
Checklist For Reviewers
Documentation
Click here for Documentation
Types of user-facing changes
Please keep the types that apply to your changes, and remove the others.
Release note