Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions swarm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ async-std = ["dep:async-std"]
wasm-bindgen = ["dep:wasm-bindgen-futures", "dep:getrandom"]

[dev-dependencies]
async-std = { version = "1.6.2", features = ["attributes"] }
either = "1.11.0"
futures = { workspace = true }
libp2p-identify = { path = "../protocols/identify" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
Expand All @@ -47,7 +46,7 @@ libp2p-kad = { path = "../protocols/kad" } # Using `pat
libp2p-ping = { path = "../protocols/ping" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-plaintext = { path = "../transports/plaintext" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-swarm-derive = { path = "../swarm-derive" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-swarm-test = { path = "../swarm-test", features = ["async-std"]} # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-swarm-test = { path = "../swarm-test", features = ["tokio"] }# Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
libp2p-yamux = { path = "../muxers/yamux" } # Using `path` here because this is a cyclic dev-dependency which otherwise breaks releasing.
quickcheck = { workspace = true }
criterion = { version = "0.5", features = ["async_tokio"] }
Expand Down
6 changes: 3 additions & 3 deletions swarm/tests/connection_close.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@ use libp2p_swarm::{
};
use libp2p_swarm_test::SwarmExt;

#[async_std::test]
#[tokio::test]
async fn sends_remaining_events_to_behaviour_on_connection_close() {
let mut swarm1 = Swarm::new_ephemeral(|_| Behaviour::new(3));
let mut swarm2 = Swarm::new_ephemeral(|_| Behaviour::new(3));
let mut swarm1 = Swarm::new_ephemeral_tokio(|_| Behaviour::new(3));
let mut swarm2 = Swarm::new_ephemeral_tokio(|_| Behaviour::new(3));

swarm2.listen().with_memory_addr_external().await;
swarm1.connect(&mut swarm2).await;
Expand Down
4 changes: 2 additions & 2 deletions swarm/tests/listener.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ use libp2p_swarm::{
};
use libp2p_swarm_test::SwarmExt;

#[async_std::test]
#[tokio::test]
async fn behaviour_listener() {
let mut swarm = Swarm::new_ephemeral(|_| Behaviour::default());
let mut swarm = Swarm::new_ephemeral_tokio(|_| Behaviour::default());
let addr: Multiaddr = Protocol::Memory(0).into();
let id = swarm.behaviour_mut().listen(addr.clone());

Expand Down
Loading