@@ -565,8 +565,6 @@ mod tests {
565
565
message:: { Message , Viewtype } ,
566
566
test_utils:: { TestContext , TestContextManager } ,
567
567
} ;
568
- use std:: time:: Duration ;
569
- use tokio:: time:: timeout;
570
568
571
569
#[ tokio:: test( flavor = "multi_thread" , worker_threads = 2 ) ]
572
570
async fn test_can_communicate ( ) {
@@ -991,31 +989,24 @@ mod tests {
991
989
let fiona_advert = fiona. pop_sent_msg ( ) . await ;
992
990
alice. recv_msg_trash ( & fiona_advert) . await ;
993
991
994
- timeout ( Duration :: from_secs ( 2 ) , fiona_connect_future)
995
- . await
996
- . unwrap ( )
997
- . unwrap ( ) ;
992
+ fiona_connect_future. await . unwrap ( ) ;
998
993
send_webxdc_realtime_data ( alice, instance. id , b"alice -> bob & fiona" . into ( ) )
999
994
. await
1000
995
. unwrap ( ) ;
1001
996
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
+ ) ;
1014
1007
}
1015
1008
}
1016
- } )
1017
- . await
1018
- . unwrap ( ) ;
1009
+ }
1019
1010
}
1020
1011
1021
1012
async fn connect_alice_bob (
0 commit comments