use of io.vertx.core.dns.impl.DnsClientImpl in project vert.x by eclipse.
the class DNSTest method testRecursionDesired.
@Test
public void testRecursionDesired() throws Exception {
final String ip = "10.0.0.1";
dnsServer.testResolveA(ip);
DnsClient dns = prepareDns(new DnsClientOptions().setRecursionDesired(true));
dns.resolveA("vertx.io", onSuccess(result -> {
assertFalse(result.isEmpty());
assertEquals(1, result.size());
assertEquals(ip, result.get(0));
DnsMessage msg = dnsServer.pollMessage();
assertTrue(msg.isRecursionDesired());
((DnsClientImpl) dns).inProgressQueries(num -> {
assertEquals(0, (int) num);
testComplete();
});
}));
await();
}
Aggregations