Skip to content

Commit

Permalink
Undo test changes
Browse files Browse the repository at this point in the history
  • Loading branch information
mxinden committed Nov 27, 2023
1 parent a43fbee commit bb0c6a5
Showing 1 changed file with 3 additions and 9 deletions.
12 changes: 3 additions & 9 deletions test-harness/tests/poll_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ use tokio::net::TcpStream;
use tokio::runtime::Runtime;
use tokio::task;
use tokio_util::compat::TokioAsyncReadCompatExt;
use yamux::{Config, Connection, ConnectionError, Mode, DEFAULT_CREDIT};
use yamux::{Config, Connection, ConnectionError, Mode};

#[test]
fn prop_config_send_recv_multi() {
Expand Down Expand Up @@ -62,10 +62,6 @@ fn concurrent_streams() {
let mut cfg = Config::default();
cfg.set_split_send_size(PAYLOAD_SIZE); // Use a large frame size to speed up the test.

// TODO: Rethink these.
cfg.set_max_connection_receive_window(n_streams * DEFAULT_CREDIT as usize);
cfg.set_max_num_streams(n_streams);

Runtime::new().expect("new runtime").block_on(async move {
let (server, client) = connected_peers(cfg.clone(), cfg, tcp_buffer_sizes)
.await
Expand Down Expand Up @@ -181,9 +177,7 @@ fn prop_config_send_recv_single() {
let server = echo_server(server);

let client = async {
let stream = future::poll_fn(|cx| client.poll_new_outbound(cx))
.await
.unwrap();
let stream = future::poll_fn(|cx| client.poll_new_outbound(cx)).await?;
let client_task = noop_server(stream::poll_fn(|cx| client.poll_next_inbound(cx)));

future::select(pin!(client_task), pin!(send_on_single_stream(stream, msgs))).await;
Expand All @@ -193,7 +187,7 @@ fn prop_config_send_recv_single() {
Ok(())
};

futures::future::try_join(server, client).await.unwrap();
futures::future::try_join(server, client).await?;

Ok(())
})
Expand Down

0 comments on commit bb0c6a5

Please sign in to comment.