chore: swarm executor should match runtime in tests#6024
Merged
mergify[bot] merged 10 commits intolibp2p:masterfrom May 27, 2025
Merged
chore: swarm executor should match runtime in tests#6024mergify[bot] merged 10 commits intolibp2p:masterfrom
mergify[bot] merged 10 commits intolibp2p:masterfrom
Conversation
elenaf9
commented
May 18, 2025
2df7e87 to
eed59a9
Compare
…ix/swarm-executor-in-tests
…ix/swarm-executor-in-tests
4 tasks
jxs
approved these changes
May 27, 2025
Member
jxs
left a comment
There was a problem hiding this comment.
Thanks for this Elena! LGTM
We could probably also make the Swarm::new_ephemeral use tokio by default in a subsequent PR, wdyt Elena?
4 tasks
This file contains hidden or 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
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.
Description
We've changed most of our tests to use the
tokioruntime: #4449.All of these tests, however, were using
swarm_test::Swarm::new_ephemeral, which actually creates aSwarmwithasync_stdexecutor.This PR changes all test that are using tokio as runtime to use
swarm_test::Swarm::new_ephemeral_tokio, so that the executor used by the swarm matches the test's executor.It also defaults
swarm-testto thetokiofeature.Notes & open questions
Done to prevent that in future PRs and tests
Swarm::new_ephemeralis accidentally used again. Crates will need to explicitly enable theasync-stdfeature if they actually want to use that executor.Change checklist