test: fix compile errors
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
use trust_dns_resolver::name_server::GenericConnection;
|
||||
use trust_dns_resolver::testing;
|
||||
|
||||
use crate::config::{ResolverConfig, ResolverOpts};
|
||||
@@ -5,7 +6,7 @@ use crate::lookup::LookupFuture;
|
||||
use crate::lookup_ip::LookupIpFuture;
|
||||
use crate::proto::xfer::DnsRequest;
|
||||
use crate::proto::Executor;
|
||||
use crate::runtime::{AsyncStdConnection, AsyncStdRuntimeProvider};
|
||||
use crate::runtime::AsyncStdRuntimeProvider;
|
||||
use crate::AsyncStdResolver;
|
||||
use crate::ResolveError;
|
||||
|
||||
@@ -28,15 +29,15 @@ fn test_send_sync() {
|
||||
assert!(is_sync_t::<AsyncStdResolver>());
|
||||
|
||||
assert!(is_send_t::<DnsRequest>());
|
||||
assert!(is_send_t::<LookupIpFuture<AsyncStdConnection, ResolveError>>());
|
||||
assert!(is_send_t::<LookupFuture<AsyncStdConnection, ResolveError>>());
|
||||
assert!(is_send_t::<LookupIpFuture<GenericConnection, ResolveError>>());
|
||||
assert!(is_send_t::<LookupFuture<GenericConnection, ResolveError>>());
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_lookup_google() {
|
||||
use testing::lookup_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
lookup_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(
|
||||
ResolverConfig::google(),
|
||||
io_loop,
|
||||
@@ -48,7 +49,7 @@ fn test_lookup_google() {
|
||||
fn test_lookup_cloudflare() {
|
||||
use testing::lookup_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
lookup_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(
|
||||
ResolverConfig::cloudflare(),
|
||||
io_loop,
|
||||
@@ -60,7 +61,7 @@ fn test_lookup_cloudflare() {
|
||||
fn test_lookup_quad9() {
|
||||
use testing::lookup_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
lookup_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(
|
||||
ResolverConfig::quad9(),
|
||||
io_loop,
|
||||
@@ -72,7 +73,7 @@ fn test_lookup_quad9() {
|
||||
fn test_ip_lookup() {
|
||||
use testing::ip_lookup_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
ip_lookup_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle)
|
||||
}
|
||||
|
||||
@@ -80,7 +81,7 @@ fn test_ip_lookup() {
|
||||
fn test_ip_lookup_across_threads() {
|
||||
use testing::ip_lookup_across_threads_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
ip_lookup_across_threads_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(handle)
|
||||
}
|
||||
|
||||
@@ -89,7 +90,7 @@ fn test_ip_lookup_across_threads() {
|
||||
fn test_sec_lookup() {
|
||||
use testing::sec_lookup_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
sec_lookup_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -98,7 +99,7 @@ fn test_sec_lookup() {
|
||||
fn test_sec_lookup_fails() {
|
||||
use testing::sec_lookup_fails_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
sec_lookup_fails_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -109,7 +110,7 @@ fn test_sec_lookup_fails() {
|
||||
fn test_system_lookup() {
|
||||
use testing::system_lookup_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
system_lookup_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -121,7 +122,7 @@ fn test_system_lookup() {
|
||||
fn test_hosts_lookup() {
|
||||
use testing::hosts_lookup_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
hosts_lookup_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -129,7 +130,7 @@ fn test_hosts_lookup() {
|
||||
fn test_fqdn() {
|
||||
use testing::fqdn_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
fqdn_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -137,7 +138,7 @@ fn test_fqdn() {
|
||||
fn test_ndots() {
|
||||
use testing::ndots_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
ndots_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -145,7 +146,7 @@ fn test_ndots() {
|
||||
fn test_large_ndots() {
|
||||
use testing::large_ndots_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
large_ndots_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -153,7 +154,7 @@ fn test_large_ndots() {
|
||||
fn test_domain_search() {
|
||||
use testing::domain_search_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
domain_search_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -161,7 +162,7 @@ fn test_domain_search() {
|
||||
fn test_search_list() {
|
||||
use testing::search_list_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
search_list_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -169,7 +170,7 @@ fn test_search_list() {
|
||||
fn test_idna() {
|
||||
use testing::idna_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
idna_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -177,7 +178,7 @@ fn test_idna() {
|
||||
fn test_localhost_ipv4() {
|
||||
use testing::localhost_ipv4_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
localhost_ipv4_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -185,7 +186,7 @@ fn test_localhost_ipv4() {
|
||||
fn test_localhost_ipv6() {
|
||||
use testing::localhost_ipv6_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
localhost_ipv6_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(io_loop, handle);
|
||||
}
|
||||
|
||||
@@ -193,7 +194,7 @@ fn test_localhost_ipv6() {
|
||||
fn test_search_ipv4_large_ndots() {
|
||||
use testing::search_ipv4_large_ndots_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
search_ipv4_large_ndots_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(
|
||||
io_loop, handle,
|
||||
);
|
||||
@@ -203,7 +204,7 @@ fn test_search_ipv4_large_ndots() {
|
||||
fn test_search_ipv6_large_ndots() {
|
||||
use testing::search_ipv6_large_ndots_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
search_ipv6_large_ndots_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(
|
||||
io_loop, handle,
|
||||
);
|
||||
@@ -213,7 +214,7 @@ fn test_search_ipv6_large_ndots() {
|
||||
fn test_search_ipv6_name_parse_fails() {
|
||||
use testing::search_ipv6_name_parse_fails_test;
|
||||
let io_loop = AsyncStdRuntimeProvider::new();
|
||||
let handle = io_loop.handle();
|
||||
let handle = io_loop.clone();
|
||||
search_ipv6_name_parse_fails_test::<AsyncStdRuntimeProvider, AsyncStdRuntimeProvider>(
|
||||
io_loop, handle,
|
||||
);
|
||||
|
Reference in New Issue
Block a user