speed up e2e test

This commit is contained in:
Igor Katson 2024-08-14 11:53:12 +01:00
parent d7e59f3293
commit 35b20f754b
No known key found for this signature in database
GPG key ID: B4EC22B66D61A3F5
2 changed files with 3 additions and 3 deletions

View file

@ -57,7 +57,7 @@ async fn test_e2e_download() {
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(

View file

@ -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