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());
}
}
Aggregations