Skip to content

Commit 53fe757

Browse files
committed
remove timout
1 parent 933760d commit 53fe757

File tree

1 file changed

+12
-21
lines changed

1 file changed

+12
-21
lines changed

src/peer_channels.rs

Lines changed: 12 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -565,8 +565,6 @@ mod tests {
565565
message::{Message, Viewtype},
566566
test_utils::{TestContext, TestContextManager},
567567
};
568-
use std::time::Duration;
569-
use tokio::time::timeout;
570568

571569
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
572570
async fn test_can_communicate() {
@@ -991,31 +989,24 @@ mod tests {
991989
let fiona_advert = fiona.pop_sent_msg().await;
992990
alice.recv_msg_trash(&fiona_advert).await;
993991

994-
timeout(Duration::from_secs(2), fiona_connect_future)
995-
.await
996-
.unwrap()
997-
.unwrap();
992+
fiona_connect_future.await.unwrap();
998993
send_webxdc_realtime_data(alice, instance.id, b"alice -> bob & fiona".into())
999994
.await
1000995
.unwrap();
1001996

1002-
timeout(Duration::from_secs(2), async {
1003-
loop {
1004-
let event = fiona.evtracker.recv().await.unwrap();
1005-
if let EventType::WebxdcRealtimeData { data, .. } = event.typ {
1006-
if data == b"alice -> bob & fiona" {
1007-
break;
1008-
} else {
1009-
panic!(
1010-
"Unexpected status update: {}",
1011-
String::from_utf8_lossy(&data)
1012-
);
1013-
}
997+
loop {
998+
let event = fiona.evtracker.recv().await.unwrap();
999+
if let EventType::WebxdcRealtimeData { data, .. } = event.typ {
1000+
if data == b"alice -> bob & fiona" {
1001+
break;
1002+
} else {
1003+
panic!(
1004+
"Unexpected status update: {}",
1005+
String::from_utf8_lossy(&data)
1006+
);
10141007
}
10151008
}
1016-
})
1017-
.await
1018-
.unwrap();
1009+
}
10191010
}
10201011

10211012
async fn connect_alice_bob(

0 commit comments

Comments
 (0)