-
Notifications
You must be signed in to change notification settings - Fork 343
Add unit tests for UpdateStatisticsAction functionality. #1675
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
Add unit tests for UpdateStatisticsAction functionality. #1675
Conversation
898c637 to
18a4807
Compare
…isticsAction. - Tests cover scenarios for: 1. Setting a single statistics file. 2. Ensuring no statistics are set.
18a4807 to
b4ea24a
Compare
|
@Xuanwo @liurenjie1024 Could you please help review this PR? Thank you very much! |
| } | ||
|
|
||
| #[test] | ||
| fn test_set_single_statistics() { |
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's the difference between this and test_update_statistics? Looks like both covert the set_statistics path.
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.
Thank you for your question! In fact, test_no_statistics_set, test_set_single_statistics, and test_update_statistics test different scenarios.
-
test_no_statistics_set: Verifies that statistics_to_set is empty when no statistics are set or removed, ensuring the system handles this correctly when no operations are performed. -
test_set_single_statistics: Verifies the setting of a single statistics file, ensuring that the set_statistics operation works correctly. -
test_update_statistics: Tests the setting and removal of multiple statistics files, verifying the correct behavior of multiple set_statistics and remove_statistics operations combined.
liurenjie1024
left a comment
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.
Thanks @slfan1989 for adding this pr!
@liurenjie1024 @ZENOTME Thank you very much for helping to review the code! |
## Which issue does this PR close? - Closes apache#1676. ## What changes are included in this PR? - Added tests for setting and removing statistics files in UpdateStatisticsAction. - Tests cover scenarios for: 1. Setting a single statistics file. 2. Ensuring no statistics are set. ## Are these changes tested? Tested locally.
Which issue does this PR close?
What changes are included in this PR?
Are these changes tested?
Tested locally.