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

Removes unnecessary tests in snapshot_packager_service.rs #1371

Merged
merged 1 commit into from
May 16, 2024

Conversation

brooksprumo
Copy link

Problem

I'm working to remove serde_snapshot::reserialize_bank_with_new_accounts_hash(), and instead only serialize the bank once.

One of the tests in snapshot_packager_service.rs is to package up a snapshot. The test calls snapshot_bank_utils::package_and_archive_snapshot(), which calls reserialize. An observation is that the test in SPS doesn't actually test any code in SPS; it's all snapshot code being tested. The next observation is that we have many tests that exercise package_and_archive_snapshot(), thus the test in SPS can be safely removed as redundant. This removes a caller of reserialize_bank_with_new_accounts_hash(), yay!

Summary of Changes

Remove the redundant tests in SPS.

@codecov-commenter
Copy link

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 82.7%. Comparing base (ec9bd79) to head (326dd49).
Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master    #1371     +/-   ##
=========================================
- Coverage    82.8%    82.7%   -0.1%     
=========================================
  Files         872      872             
  Lines      369235   369169     -66     
=========================================
- Hits       305811   305638    -173     
- Misses      63424    63531    +107     

@brooksprumo brooksprumo marked this pull request as ready for review May 15, 2024 19:40
Copy link

@jeffwashington jeffwashington left a comment

Choose a reason for hiding this comment

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

lgtm

@brooksprumo brooksprumo merged commit e01278e into anza-xyz:master May 16, 2024
38 checks passed
@brooksprumo brooksprumo deleted the sps/tests branch May 16, 2024 16:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants