File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
tarantool/src/network/client Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -491,14 +491,18 @@ mod tests {
491
491
#[ crate :: test( tarantool = "crate" ) ]
492
492
async fn connect_with_timeout ( ) {
493
493
// Without timeout, the connection hangs on address like this
494
- Client :: connect_with_config (
495
- "123123" ,
494
+ let client = Client :: connect_with_config (
495
+ "123123" , // Invalid host
496
496
listen_port ( ) ,
497
497
protocol:: Config :: default ( ) ,
498
498
Some ( Duration :: from_secs ( 1 ) ) ,
499
- )
500
- . await
501
- . unwrap_err ( ) ;
499
+ ) ;
500
+ let res = client. await . unwrap_err ( ) ;
501
+ if cfg ! ( target_os = "macos" ) {
502
+ assert ! ( res. to_string( ) . contains( "No route to host" ) ) ;
503
+ } else {
504
+ assert_eq ! ( res. to_string( ) , "connect timeout" ) ;
505
+ }
502
506
}
503
507
504
508
#[ crate :: test( tarantool = "crate" ) ]
You can’t perform that action at this time.
0 commit comments