Skip to content

Commit

Permalink
Ignore nslookup failure
Browse files Browse the repository at this point in the history
Signed-off-by: John Nunley <[email protected]>
  • Loading branch information
notgull committed Jan 27, 2024
1 parent 298568e commit 8741554
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions tests/issue_182.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,13 @@ use std::net::{TcpStream, ToSocketAddrs};

#[test]
fn networking_initialized() {
let address = ToSocketAddrs::to_socket_addrs(&("google.com", 80))
.unwrap()
.next()
.unwrap();
let address = match ToSocketAddrs::to_socket_addrs(&("google.com", 80)) {
Ok(mut addrs) => addrs.next().unwrap(),
Err(err) => {
eprintln!("Got error {err} when looking up google.com, exiting test early.");
return;
}
};
async_io::block_on(async move {
let _ = Async::<TcpStream>::connect(address).await.unwrap();
});
Expand Down

0 comments on commit 8741554

Please sign in to comment.