You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: mdns_tests.rs
    path of file: ./repos/hickory-dns/tests/integration-tests/tests
    
    the code of the file until where you have to start completion: #![cfg(feature = "mdns")]

use std::net::{IpAddr, Ipv4Addr, Ipv6Addr, SocketAddr};
use std::sync::atomic::{AtomicBool, Ordering};
use std::sync::{Arc, Barrier};
use std::thread::JoinHandle;
use std::time::Duration;

use futures::future::Either;
use futures::{future, StreamExt};
use once_cell::sync::Lazy;
use tokio::runtime::Runtime;

use hickory_client::client::{AsyncClient, ClientHandle};
use hickory_client::multicast::MdnsQueryType;
use hickory_client::multicast::{MdnsClientStream, MdnsStream};
use hickory_client::op::Message;
use hickory_client::rr::{DNSClass, Name, RecordType};
use hickory_client::serialize::binary::BinDecodable;
use hickory_proto::xfer::SerialMessage;

const MDNS_PORT: u16 = 5363;

/// 250 appears to be unused/unregistered
static TEST_MDNS_IPV4: Lazy<IpAddr> = Lazy::new(|| Ipv4Addr::new(224, 0, 0, 249).into());
/// FA appears to be unused/unregistered
static TEST_MDNS_IPV6: Lazy<IpAddr> =
    Lazy::new(|
    
fn test_query_mdns_ipv4() {
    let addr = SocketAddr::new(*TEST_MDNS_IPV4, MDNS_PORT + 1);
    let client_done = Arc::new(AtomicBool::new(false));
    let _server_thread = mdns_responsder("test_query_mdns_ipv4", client_done.clone(), addr);

    // Check that the server is ready before sending...
    let io_loop = Runtime::new().unwrap();
    //let addr: SocketAddr = ("8.8.8.8", 53).to_socket_addrs().unwrap().next().unwrap();

    // not using MdnsClientConnection here, b/c we need to change the IP for testing.
    let (stream, sender) = MdnsClientStream::new(addr, MdnsQueryType::OneShot, None, None, None);
    let client = AsyncClient::new(stream, sender, None);
    let (mut client, bg) = io_loop.block_on(client).expect("failed to connect mDNS");
    hickory_proto::spawn_bg(&io_loop, bg);

    // A PTR request is the DNS-SD method for doing a directory listing...
    let name = Name::from_ascii("_dns._udp.local.").unwrap();
    let message = io_loop.block_on(client.query(name, DNSClass::IN, RecordType::PTR));

    client_done.store(true, Ordering::Relaxed);

    println!("client message: {:#?}", message);
}