-
Notifications
You must be signed in to change notification settings - Fork 745
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
Revive gossipsub tests #4286
Closed
Closed
Revive gossipsub tests #4286
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This commit simply uncomments the tests in the relevant module.
This commit replaces `tokio::time::delay_for` calls with the newer `tokio::time::sleep`.
This commit patches the test code to build a linear network topology (as the test requires) to use the newer interface for `common::build_linear`. This commit also hardcodes the fork being used for this test module to Capella.
This commit cleans up the code for setting up the necessary testing state by reordering it, adding explanatory inline comments, and updating the code to use newer interfaces where relevant.
This commit simplifies the inner `match` statement by replacing `Libp2pEvent` with `NetworkEvent` (meaning we can drop the outermost layer of nesting) and commenting out the second case (just for now; it's unclear to me at the moment which `NetworkEvent` variant it should map to).
This commit promots the existing comment block explaining the test module to a documentation comment for the entire module.
This commit patches `test_gossipsub_full_mesh_publish` by largely duplicating the fixes to the other test in the module.
This commit propagates messages to gossipsub via `Libp2pInstance::publish`.
This commit exposes the libp2p swarm type so that we can make use of it in the GS tests.
This commit uncomments the `build_full_mesh` test helper so that we can build meshnets for the GS tests.
This commit uses a meshnet topology for `test_gossipsub_full_mesh_publish` rather than a linear one.
This commit removes checks for `BehaviourEvent::PeerSubscribed` events as they are no longer used by the codebase.
This commit rewrites the main loop in `test_gossipsup_forward` to be a `while let` loop in order to satisfy Clippy.
See #4294. |
bors bot
pushed a commit
that referenced
this pull request
May 16, 2023
## Issue Addressed #2335 ## Proposed Changes - Remove the `lighthouse-network::tests::gossipsub_tests` module - Remove dead code from the `lighthouse-network::tests::common` helper module (`build_full_mesh`) ## Additional Info After discussion with both @divagant-martian and @AgeManning, these tests seem to have two main issues in that they are: - Redundant, in that they don't test anything meaningful (due to our handling of duplicate messages) - Out-of-place, in that it doesn't really test Lighthouse-specific functionality (rather libp2p functionality) As such, this PR supersedes #4286.
ghost
pushed a commit
to oone-world/lighthouse
that referenced
this pull request
Jul 13, 2023
## Issue Addressed sigp#2335 ## Proposed Changes - Remove the `lighthouse-network::tests::gossipsub_tests` module - Remove dead code from the `lighthouse-network::tests::common` helper module (`build_full_mesh`) ## Additional Info After discussion with both @divagant-martian and @AgeManning, these tests seem to have two main issues in that they are: - Redundant, in that they don't test anything meaningful (due to our handling of duplicate messages) - Out-of-place, in that it doesn't really test Lighthouse-specific functionality (rather libp2p functionality) As such, this PR supersedes sigp#4286.
Woodpile37
pushed a commit
to Woodpile37/lighthouse
that referenced
this pull request
Jan 6, 2024
## Issue Addressed sigp#2335 ## Proposed Changes - Remove the `lighthouse-network::tests::gossipsub_tests` module - Remove dead code from the `lighthouse-network::tests::common` helper module (`build_full_mesh`) ## Additional Info After discussion with both @divagant-martian and @AgeManning, these tests seem to have two main issues in that they are: - Redundant, in that they don't test anything meaningful (due to our handling of duplicate messages) - Out-of-place, in that it doesn't really test Lighthouse-specific functionality (rather libp2p functionality) As such, this PR supersedes sigp#4286.
Woodpile37
pushed a commit
to Woodpile37/lighthouse
that referenced
this pull request
Jan 6, 2024
## Issue Addressed sigp#2335 ## Proposed Changes - Remove the `lighthouse-network::tests::gossipsub_tests` module - Remove dead code from the `lighthouse-network::tests::common` helper module (`build_full_mesh`) ## Additional Info After discussion with both @divagant-martian and @AgeManning, these tests seem to have two main issues in that they are: - Redundant, in that they don't test anything meaningful (due to our handling of duplicate messages) - Out-of-place, in that it doesn't really test Lighthouse-specific functionality (rather libp2p functionality) As such, this PR supersedes sigp#4286.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue Addressed
#2335
Proposed Changes
test_gossipsub_forward
test_gossipsub_full_mesh_publish
common::build_full_mesh
to support the theseAdditional Info
N/A