diff --git a/crates/librqbit/src/tests/e2e.rs b/crates/librqbit/src/tests/e2e.rs index c5bb611..2b81d15 100644 --- a/crates/librqbit/src/tests/e2e.rs +++ b/crates/librqbit/src/tests/e2e.rs @@ -20,7 +20,7 @@ use crate::{ }; #[tokio::test(flavor = "multi_thread", worker_threads = 64)] -async fn test_e2e() { +async fn test_e2e_download() { let _ = tracing_subscriber::fmt::try_init(); // 1. Create a torrent @@ -57,7 +57,7 @@ async fn test_e2e() { async move { let peer_id = TestPeerMetadata { server_id: i, - max_random_sleep_ms: rand::thread_rng().gen_range(0u8..128), + max_random_sleep_ms: rand::thread_rng().gen_range(0u8..16), } .as_peer_id(); let session = crate::Session::new_with_opts( diff --git a/crates/librqbit/src/tests/test_util.rs b/crates/librqbit/src/tests/test_util.rs index dcf4555..4eba7a5 100644 --- a/crates/librqbit/src/tests/test_util.rs +++ b/crates/librqbit/src/tests/test_util.rs @@ -58,14 +58,14 @@ impl TestPeerMetadata { } pub fn disconnect_probability(&self) -> f64 { - if self.server_id % 2 == 0 { + if self.server_id % 2 == 1 { return 0.05f64; } 0f64 } pub fn bad_data_probability(&self) -> f64 { - if self.server_id % 2 == 0 { + if self.server_id % 2 == 1 { return 0.05f64; } 0f64