File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed
crates/matrix-sdk/src/client Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -3033,7 +3033,6 @@ pub(crate) mod tests {
3033
3033
3034
3034
use super :: Client ;
3035
3035
use crate :: {
3036
- assert_let_timeout,
3037
3036
client:: { futures:: SendMediaUploadRequest , WeakClient } ,
3038
3037
config:: { RequestConfig , SyncSettings } ,
3039
3038
futures:: SendRequest ,
@@ -3963,7 +3962,12 @@ pub(crate) mod tests {
3963
3962
3964
3963
// Call the endpoint once to check the timeout.
3965
3964
let mut stream = Box :: pin ( client. sync_stream ( SyncSettings :: new ( ) ) . await ) ;
3966
- assert_let_timeout ! ( Some ( Ok ( _) ) = stream. next( ) ) ;
3965
+
3966
+ timeout ( Duration :: from_secs ( 1 ) , async {
3967
+ stream. next ( ) . await . unwrap ( ) . unwrap ( ) ;
3968
+ } )
3969
+ . await
3970
+ . unwrap ( ) ;
3967
3971
}
3968
3972
3969
3973
#[ async_test]
@@ -3992,7 +3996,12 @@ pub(crate) mod tests {
3992
3996
let mut stream = Box :: pin (
3993
3997
client. sync_stream ( SyncSettings :: new ( ) . ignore_timeout_on_first_sync ( true ) ) . await ,
3994
3998
) ;
3995
- assert_let_timeout ! ( Some ( Ok ( _) ) = stream. next( ) ) ;
3996
- assert_let_timeout ! ( Some ( Ok ( _) ) = stream. next( ) ) ;
3999
+
4000
+ timeout ( Duration :: from_secs ( 1 ) , async {
4001
+ stream. next ( ) . await . unwrap ( ) . unwrap ( ) ;
4002
+ stream. next ( ) . await . unwrap ( ) . unwrap ( ) ;
4003
+ } )
4004
+ . await
4005
+ . unwrap ( ) ;
3997
4006
}
3998
4007
}
You can’t perform that action at this time.
0 commit comments