You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: make runtime features optional in swarm-test (#5551)
## Description
<!--
Please write a summary of your changes and why you made them.
This section will appear as the commit message after merging.
Please craft it accordingly.
For a quick primer on good commit messages, check out this blog post:
https://cbea.ms/git-commit/
Please include any relevant issues in here, for example:
Related https://github.com/libp2p/rust-libp2p/issues/ABCD.
Fixes https://github.com/libp2p/rust-libp2p/issues/XYZ.
-->
Sometimes a test uses custom swarm building logic and doesn't need `fn
new_ephemeral`, and sometimes a test uses `tokio` runtime other than
`async-std`.
This PR adds the `tokio` runtime support and makes both `async-std` and
`tokio` runtimes optional behind features to make it more flexible.
## Notes & open questions
<!--
Any notes, remarks or open questions you have to make about the PR which
don't need to go into the final commit message.
-->
## Change checklist
<!-- Please add a Changelog entry in the appropriate crates and bump the
crate versions if needed. See
<https://github.com/libp2p/rust-libp2p/blob/master/docs/release.md#development-between-releases>-->
- [x] I have performed a self-review of my own code
- [x] I have made corresponding changes to the documentation
- [ ] I have added tests that prove my fix is effective or that my
feature works
- [x] A changelog entry has been made in the appropriate crates
---------
Co-authored-by: João Oliveira <[email protected]>
libp2p-stream = { version = "0.2.0-alpha", path = "protocols/stream" }
105
105
libp2p-swarm = { version = "0.45.2", path = "swarm" }
106
106
libp2p-swarm-derive = { version = "=0.35.0", path = "swarm-derive" } # `libp2p-swarm-derive` may not be compatible with different `libp2p-swarm` non-breaking releases. E.g. `libp2p-swarm` might introduce a new enum variant `FromSwarm` (which is `#[non-exhaustive]`) in a non-breaking release. Older versions of `libp2p-swarm-derive` would not forward this enum variant within the `NetworkBehaviour` hierarchy. Thus the version pinning is required.
107
-
libp2p-swarm-test = { version = "0.4.0", path = "swarm-test" }
107
+
libp2p-swarm-test = { version = "0.4.1", path = "swarm-test" }
108
108
libp2p-tcp = { version = "0.42.0", path = "transports/tcp" }
109
109
libp2p-tls = { version = "0.5.0", path = "transports/tls" }
110
110
libp2p-uds = { version = "0.41.0", path = "transports/uds" }
.with_idle_connection_timeout(Duration::from_secs(5)),// Some tests need connections to be kept alive beyond what the individual behaviour configures.,
.with_idle_connection_timeout(Duration::from_secs(5)),// Some tests need connections to be kept alive beyond what the individual behaviour configures.,
0 commit comments