-
Notifications
You must be signed in to change notification settings - Fork 106
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
fix(tests): add submitblock test to CI, and avoid copying the cached state directory in other tests #5589
Conversation
Running a send transactions test here: https://github.com/ZcashFoundation/zebra/actions/runs/3424052393 |
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, looks good!
I like the way you have re-used a lot of the existing code.
I have a few minor suggestions, and I noticed some things from the old tests that are missing.
Note for other reviewers: It was very tricky for me to review the changes to Here's how I got a diff: git checkout origin/update-ci-and-long-running-tests zebrad/tests/common/test_type.rs
cd ..
git diff --unified=10 zebra/zebrad/tests/common/lightwalletd.rs zebra/zebrad/tests/common/test_type.rs |
If this PR makes the send transactions test fast enough, we can open a ticket to run it on every PR again. |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #5589 +/- ##
==========================================
- Coverage 78.80% 78.62% -0.18%
==========================================
Files 305 305
Lines 38120 38178 +58
==========================================
- Hits 30040 30017 -23
- Misses 8080 8161 +81 |
Co-authored-by: teor <teor@riseup.net>
I think ~30m is fast enough, I created issue #5600 for running it on every PR update. |
mempool_requests_for_transactions test failed in CI Docker / Test All:
Issue #5384 |
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.
Looks good, let's merge!
I added the new test to the branch protection rules for |
Motivation
The send transactions and submitblock tests were needlessly copying the entire zebra cached state directory.
The submitblock test also included duplicate code, was missing some details, and hadn't been added to our CI.
There are a few commits that are purely code movement and renaming.
Solution
LightwalletdTestType
toTestType
, adds aUpdateZebraCachedState
variant, and moves it to a new filerandom_known_rpc_port_config
fn toconfig.rs
fileTestType
and adds aneeds_zebra_rpc_server
method for determining the configget_raw_future_blocks
andget_future_blocks
fns for fully syncing Zebra and getting up to the firstmax_num_blocks
in best chain of the non-finalized statemax_num_blocks
past the cached state in the send transaction and submitblock testsReview
This PR is part of regular scheduled work.
Anyone can review.
Reviewer Checklist
Follow Up Work