@@ -477,17 +477,17 @@ mod tests {
477477 let mut subscription = robust. subscribe_blocks ( ) . await ?;
478478
479479 ws_provider. anvil_mine ( Some ( 1 ) , None ) . await ?;
480- assert_eq ! ( 1 , subscription. recv ( ) . await ?. number( ) ) ;
480+ assert_eq ! ( 1 , subscription. try_recv_block ( ) . await ?. number( ) ) ;
481481
482482 ws_provider. anvil_mine ( Some ( 1 ) , None ) . await ?;
483- assert_eq ! ( 2 , subscription. recv ( ) . await ?. number( ) ) ;
483+ assert_eq ! ( 2 , subscription. try_recv_block ( ) . await ?. number( ) ) ;
484484
485485 // simulate ws stream gone via no blocks mined > sub timeout
486486 sleep ( Duration :: from_millis ( 600 ) ) . await ;
487487
488488 http_provider. anvil_mine ( Some ( 1 ) , None ) . await ?;
489489
490- let err = subscription. recv ( ) . await . unwrap_err ( ) ;
490+ let err = subscription. try_recv_block ( ) . await . unwrap_err ( ) ;
491491
492492 // The error should be either a Timeout or BackendGone from the primary WS provider,
493493 // NOT a PubsubUnavailable error (which would indicate HTTP fallback was attempted)
@@ -653,12 +653,12 @@ mod tests {
653653
654654 // simulate ws stream gone via no blocks mined > sub timeout
655655 ws_provider. anvil_mine ( Some ( 1 ) , None ) . await ?;
656- let _block = subscription. recv ( ) . await ?;
656+ let _block = subscription. try_recv_block ( ) . await ?;
657657
658658 // simulate ws stream gone via no blocks mined > sub timeout
659659 sleep ( Duration :: from_millis ( 600 ) ) . await ;
660660
661- let err = subscription. recv ( ) . await . unwrap_err ( ) ;
661+ let err = subscription. try_recv_block ( ) . await . unwrap_err ( ) ;
662662
663663 match err {
664664 Error :: Timeout => { }
0 commit comments