Search in sources :

Example 1 with DnsServerAddressStream

use of io.netty.resolver.dns.DnsServerAddressStream in project netty by netty.

the class MacOSDnsServerAddressStreamProviderTest method testStream.

@Test
void testStream() {
    MacOSDnsServerAddressStreamProvider.ensureAvailability();
    DnsServerAddressStreamProvider provider = new MacOSDnsServerAddressStreamProvider();
    DnsServerAddressStream stream = provider.nameServerAddressStream("netty.io");
    assertNotNull(stream);
    assertNotEquals(0, stream.size());
    for (int i = 0; i < stream.size(); i++) {
        assertNotEquals(0, stream.next().getPort());
    }
}
Also used : DnsServerAddressStreamProvider(io.netty.resolver.dns.DnsServerAddressStreamProvider) DnsServerAddressStream(io.netty.resolver.dns.DnsServerAddressStream) Test(org.junit.jupiter.api.Test)

Aggregations

DnsServerAddressStream (io.netty.resolver.dns.DnsServerAddressStream)1 DnsServerAddressStreamProvider (io.netty.resolver.dns.DnsServerAddressStreamProvider)1 Test (org.junit.jupiter.api.Test)1