rust-libp2p/muxers/yamux/tests/compliance.rs
Thomas Eizinger 5b3612bb29
test: Remove dialer_can_receive stream muxer test (#3108)
Various muxer implementations struggle to fulfill this test. In practice, it doesn't matter much because we always run `multistream-select` on top of a newly negotiated stream so we never end up actually reading from a stream that we have never written to.

Relevant discussion: https://github.com/kpp/rust-libp2p/pull/27#discussion_r1012128418
2022-11-14 21:09:19 +00:00

20 lines
553 B
Rust

use libp2p_yamux::YamuxConfig;
#[async_std::test]
async fn close_implies_flush() {
let (alice, bob) =
libp2p_muxer_test_harness::connected_muxers_on_memory_transport::<YamuxConfig, _, _>()
.await;
libp2p_muxer_test_harness::close_implies_flush(alice, bob).await;
}
#[async_std::test]
async fn read_after_close() {
let (alice, bob) =
libp2p_muxer_test_harness::connected_muxers_on_memory_transport::<YamuxConfig, _, _>()
.await;
libp2p_muxer_test_harness::read_after_close(alice, bob).await;
}