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

tests(app): 💎 polish mock consensus test infrastructure #4185

Merged
merged 8 commits into from
Apr 11, 2024

Conversation

cratelyn
Copy link
Contributor

@cratelyn cratelyn commented Apr 9, 2024

see #3588. follows #4184 and #4181.

this takes a pass through the shared, Penumbra-specific test infrastructure for mock consensus tests. notably, this decomposes init_chain.rs, which has now become somewhat redundant with the existence of other more involved tests of e.g. validator uptime tracking.

this also cleans up some unused imports, guards against future occurrences of that issue (sharing code in tests/ files is awkward), and decomposes the common/mod.rs file into some distinct standalone components.

this also belatedly removes the common::start_test_node() helper. at some point (i was unable to find the link) it was suggested that we refrain from a shared setup helper like that. this branch removes that helper, and updates its call-sites.

this branch is largely code motion, and is intended to be a last bit of cleanup as we prepare for #3588 to wind down. ❤️

checklist before requesting a review

  • If this code contains consensus-breaking changes, I have added the "consensus-breaking" label. Otherwise, I declare my belief that there are not consensus-breaking changes, for the following reason:

    this only changes test code

cratelyn and others added 7 commits April 9, 2024 17:05
in a previous PR review (_i could not find a link, i'm afraid_)
@hdevalence suggested that we remove the `common::start_test_node()`
helper. this belatedly performs that code transformation.

Co-authored-by: Henry de Valence <hdevalence@penumbralabs.xyz>
now that we have outlined the distinct components of shared test
infrastructure, this import block is no longer load-bearing.
@cratelyn cratelyn added the A-mock-consensus Area: Relates to the mock consensus engine label Apr 9, 2024
@cratelyn cratelyn added this to the Sprint 4 milestone Apr 9, 2024
@cratelyn cratelyn self-assigned this Apr 9, 2024
this was useful in early development, but we can (a) break this into
distinct test files, and (b) get rid of
`mock_consensus_can_send_an_init_chain_request` which is now obselete
thanks to a more sophisticated test suite.
@cratelyn cratelyn force-pushed the kate/mock-consensus-polish-pass-pt-ii branch from 8b841db to f422c60 Compare April 10, 2024 17:31
@cratelyn cratelyn requested a review from conorsch April 10, 2024 18:13
@conorsch conorsch merged commit b6fe24f into main Apr 11, 2024
8 checks passed
@conorsch conorsch deleted the kate/mock-consensus-polish-pass-pt-ii branch April 11, 2024 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-mock-consensus Area: Relates to the mock consensus engine
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants