@@ -423,7 +423,7 @@ mod async_resolver_test {
423
423
assert ! ( answer. is_empty( ) ) ;
424
424
}
425
425
426
- #[ tokio:: test] //FIXME: se cae
426
+ #[ tokio:: test]
427
427
async fn poll_lookup_max_tries ( ) {
428
428
429
429
let domain_name = DomainName :: new_from_string ( "example.com" . to_string ( ) ) ;
@@ -436,15 +436,19 @@ mod async_resolver_test {
436
436
let conn_udp: ClientUDPConnection = ClientUDPConnection :: new ( non_existent_server, timeout) ;
437
437
let conn_tcp: ClientTCPConnection = ClientTCPConnection :: new ( non_existent_server, timeout) ;
438
438
config. set_name_servers ( vec ! [ ( conn_udp, conn_tcp) ] ) ;
439
- config. set_retry ( 1 ) ;
439
+ config. set_retry ( 10 ) ;
440
440
441
441
let response_future = LookupFutureStub :: lookup ( domain_name, record_type , config) . await ;
442
442
println ! ( "response_future {:?}" , response_future) ;
443
443
444
444
assert_eq ! ( response_future. is_ok( ) , true ) ;
445
- // assert_eq!(response_future.unwrap().get_header().get_ancount(), 0);
446
- assert_eq ! ( response_future. unwrap( ) . get_header( ) . get_rcode( ) , 2 ) ;
447
- // assert_eq!(response_future.unwrap().get_header().get_rcode() , 2); //FIXME:
445
+ let response = response_future. unwrap ( ) ;
446
+ assert_eq ! ( response. get_header( ) . get_rcode( ) , 2 ) ;
447
+
448
+ let answer = response. get_answer ( ) ;
449
+ assert ! ( answer. is_empty( ) ) ;
450
+
451
+
448
452
}
449
453
450
454
#[ tokio:: test]
0 commit comments