Skip to content

Commit

Permalink
fixed test poll lookup a empty
Browse files Browse the repository at this point in the history
  • Loading branch information
FranciscaOrtegaG committed Nov 16, 2023
1 parent f8eee4d commit cff4874
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions src/resolver/lookup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ mod async_resolver_test {
}

#[tokio::test]
async fn poll_lookup_a_error(){
async fn poll_lookup_a_empty(){

let domain_name = DomainName::new_from_string("example.com".to_string());
let timeout = Duration::from_secs(2);
Expand All @@ -391,14 +391,15 @@ mod async_resolver_test {
let response_future = LookupFutureStub::lookup(domain_name, record_type ,config, cache).await;
println!("response_future {:?}",response_future);

// assert_eq!(response_future.is_ok(), true);
// let response = response_future.unwrap();
// assert_eq!(response_future.unwrap().get_header().get_ancount(), 0);
// assert_eq!(response.get_header().get_rcode() , 2);
// assert_eq!(response_future.unwrap().get_header().get_rcode() , 2); //FIXME:
assert_eq!(response_future.is_ok(), true);
let response = response_future.unwrap();
assert_eq!(response.get_header().get_ancount(), 0);
assert_eq!(response.get_header().get_rcode() , 2);

let answer = response.get_answer();
assert!(answer.is_empty());
}

#[ignore]
#[tokio::test] //FIXME: se cae
async fn poll_lookup_max_tries(){

Expand Down

0 comments on commit cff4874

Please sign in to comment.